summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-01-09 10:18:11 +0000
committerEric Andersen <andersen@codepoet.org>2002-01-09 10:18:11 +0000
commitf605da2fb6ec413fbd86e45a78f53cb2e721ab74 (patch)
treeed3cbb4371c74d24530885a902c34317419358b7 /Rules.mak
parent066a8e2f6f4637d7239a141bd57e73c82991b690 (diff)
Be more carefull about erroring out of shell fragments. Try to
enable -falign-functions if avilable.
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak4
1 files changed, 3 insertions, 1 deletions
diff --git a/Rules.mak b/Rules.mak
index 6ebf51775..a4149688e 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -44,8 +44,10 @@ TARGET_ARCH=${shell $(CC) -dumpmachine | sed -e s'/-.*//' -e 's/i.86/i386/' -e '
# Some nice architecture specific optimizations
ifndef OPTIMIZATION
# use '-Os' optimization if available, else use -O2, allow Config to override
-OPTIMIZATION = ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
+OPTIMIZATION += ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
then echo "-Os"; else echo "-O2" ; fi}
+OPTIMIZATION += ${shell if $(CC) -falign-functions=1 -S -o /dev/null -xc \
+ /dev/null >/dev/null 2>&1; then echo "-falign-functions=1"; fi}
ifeq ($(strip $(TARGET_ARCH)),arm)
OPTIMIZATION+=-fstrict-aliasing
endif