diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-06-23 04:57:20 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-06-23 04:57:20 +0000 |
commit | cae50300879c2ed02f724681f1d1fcea7db52372 (patch) | |
tree | fb549b740987bf017a7aab8b0350fccfea059bcf /Rules.mak | |
parent | 664a3ec73c9ee04bf056633e4736f402225fa36e (diff) |
Rework compiler optimization code to be smarter
-Erik
Diffstat (limited to 'Rules.mak')
-rw-r--r-- | Rules.mak | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |