diff options
author | Eric Andersen | 2001-11-10 11:23:47 +0000 |
---|---|---|
committer | Eric Andersen | 2001-11-10 11:23:47 +0000 |
commit | 30fcef430c59e5884f6765d16fc201c303b2e92c (patch) | |
tree | c36e2f86cfdd7612c6fe4f792c8fa7f6175ce2cb | |
parent | cd8c436d811a5a077a0b61a6616c900173e2dcfb (diff) | |
download | busybox-30fcef430c59e5884f6765d16fc201c303b2e92c.zip busybox-30fcef430c59e5884f6765d16fc201c303b2e92c.tar.gz |
Only use -mpreferred-stack-boundary with gcc versions that support it
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -111,9 +111,11 @@ export VERSION BUILDTIME TOPDIR HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP # use '-Os' optimization if available, else use -O2 OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null \ >/dev/null 2>&1; then echo "-Os"; else echo "-O2" ; fi} - +GCC_STACK_BOUNDRY := ${shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null \ + >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; else echo "" ; fi} +OPTIMIZATIONS=$(OPTIMIZATION) -fomit-frame-pointer $(GCC_STACK_BOUNDRY) WARNINGS=-Wall -Wstrict-prototypes -Wshadow -CFLAGS = -I $(TOPDIR)/include +CFLAGS = -I$(TOPDIR)/include ARFLAGS = -r # @@ -147,7 +149,7 @@ ifeq ($(strip $(DODEBUG)),true) LDFLAGS += -Wl,-warn-common STRIPCMD = else - CFLAGS += $(WARNINGS) $(OPTIMIZATION) -fomit-frame-pointer -mpreferred-stack-boundary=2 -D_GNU_SOURCE + CFLAGS += $(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE LDFLAGS += -s -Wl,-warn-common STRIPCMD = $(STRIP) --remove-section=.note --remove-section=.comment $(PROG) endif |