summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-06-23 04:57:20 +0000
committerEric Andersen <andersen@codepoet.org>2002-06-23 04:57:20 +0000
commitcae50300879c2ed02f724681f1d1fcea7db52372 (patch)
treefb549b740987bf017a7aab8b0350fccfea059bcf
parent664a3ec73c9ee04bf056633e4736f402225fa36e (diff)
Rework compiler optimization code to be smarter
-Erik
-rw-r--r--Rules.mak8
1 files changed, 4 insertions, 4 deletions
diff --git a/Rules.mak b/Rules.mak
index f981cf2d1..697f80b77 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -67,8 +67,6 @@ 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; \
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
@@ -76,9 +74,11 @@ ifeq ($(strip $(TARGET_ARCH)),i386)
OPTIMIZATION+=-march=i386
OPTIMIZATION += ${shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc \
/dev/null >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; fi}
- OPTIMIZATION += ${shell if $(CC) -falign-jumps=0 -falign-loops=0 \
+ OPTIMIZATION += ${shell if $(CC) -falign-functions=1 -falign-jumps=0 -falign-loops=0 \
-S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo \
- "-falign-jumps=0 -falign-loops=0"; fi}
+ "-falign-functions=1 -falign-jumps=0 -falign-loops=0"; else \
+ if $(CC) -malign-functions=0 -malign-jumps=0 -S -o /dev/null -xc \
+ /dev/null >/dev/null 2>&1; then echo "-malign-functions=0 -malign-jumps=0"; fi; fi}
endif
endif