From 81061e50a0504063fb20e6a99d024841a6aba9f0 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sun, 21 Mar 2010 00:38:13 +0100 Subject: [PATCH] adding omit-frame-pointer to cflags --- Makefile | 6 +++++- configure | 4 ++-- debian/rules | 14 +++++++++----- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index c62ddc9..108d616 100644 --- a/Makefile +++ b/Makefile @@ -128,7 +128,11 @@ clean: gui_clean install: gui_install endif -distclean: clean +profclean: clean + find . -name '*.gcno' -delete + find . -name '*.gcda' -delete + +distclean: profclean clean rm -f config.mk .PHONY: all clean remake deps install gui gui_clean distclean diff --git a/configure b/configure index 3dcab9f..c574210 100755 --- a/configure +++ b/configure @@ -15,8 +15,8 @@ echo ARCH="${ARCH}" > config.mk echo CONF_GUI=0 >> config.mk echo CONF_XSP=0 >> config.mk echo ASFLAGS="" >> config.mk -echo CFLAGS="-Wall -g -O2" >> config.mk -echo CXXFLAGS="-Wall -g -O2 -fno-exceptions -fno-rtti" >> config.mk +echo CFLAGS="-Wall -g -O2 -ffast-math" >> config.mk +echo CXXFLAGS="-Wall -g -O2 -ffast-math -fno-exceptions -fno-rtti" >> config.mk echo LDFLAGS="-Wl,-z,defs" >> config.mk make clean > /dev/null diff --git a/debian/rules b/debian/rules index 5aa6940..22c3430 100755 --- a/debian/rules +++ b/debian/rules @@ -25,10 +25,14 @@ GAME_VERSION := $(shell head -n 1 debian/changelog | sed 's/[^0-9.-]//g') CFLAGS := -Wall -g -DMAEMO -DMAEMO_VERSION=$(MAEMO_VERSION) CXXFLAGS := -Wall -g -DMAEMO -DMAEMO_VERSION=$(MAEMO_VERSION) GUI_CFLAGS := -std=c99 -fPIC -shared $(CFLAGS) -LDFLAGS := -Wl,-z,defs +LDFLAGS := -Wl,-z,defs -Wl,-O1 GUI_LDFLAGS := -export-dynamic -avoid-version -module -shared $(LDFLAGS) ASFLAGS := -g +# Compiler optimization settings +OPT_CFLAGS := -O2 -fomit-frame-pointer -ffast-math +OPT_CXXFLAGS := $(OPT_CFLAGS) -fno-exceptions -fno-rtti + M4=m4 M4DEFS=-DMAEMO_MAJOR=$(MAEMO_VERSION) @@ -38,8 +42,8 @@ ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CXXFLAGS += -O0 GUI_CFLAGS += -O0 else ifneq (,$(findstring armel,$(ARCH))) - CFLAGS += -O2 -ffast-math - CXXFLAGS += -O2 -ffast-math -fno-exceptions -fno-rtti + CFLAGS += $(OPT_CFLAGS) + CXXFLAGS += $(OPT_CXXFLAGS) GUI_CFLAGS += -Os ifneq (,$(findstring vfp,$(DEB_BUILD_OPTIONS))) CFLAGS += -march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp @@ -50,8 +54,8 @@ else ifneq (,$(findstring armel,$(ARCH))) CFLAGS += -static-libgcc endif else ifneq (,$(findstring i386,$(ARCH))) - CFLAGS += -O2 -ffast-math - CXXFLAGS += -O2 -ffast-math -fno-exceptions -fno-rtti + CFLAGS += $(OPT_CFLAGS) + CXXFLAGS += $(OPT_CXXFLAGS) GUI_CFLAGS += -O2 else # Don't support anything else -- 1.7.9.5