From cae50300879c2ed02f724681f1d1fcea7db52372 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sun, 23 Jun 2002 04:57:20 +0000 Subject: Rework compiler optimization code to be smarter -Erik --- Rules.mak | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Rules.mak') 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 -- cgit v1.2.3