[BusyBox-cvs] svn commit: trunk/busybox
vapier at busybox.net
vapier at busybox.net
Thu Jul 28 22:26:26 UTC 2005
Author: vapier
Date: 2005-07-28 16:26:25 -0600 (Thu, 28 Jul 2005)
New Revision: 10949
Log:
further refine check_gcc usage so it is only called the bare min number of times
Modified:
trunk/busybox/Rules.mak
Changeset:
Modified: trunk/busybox/Rules.mak
===================================================================
--- trunk/busybox/Rules.mak 2005-07-28 22:19:41 UTC (rev 10948)
+++ trunk/busybox/Rules.mak 2005-07-28 22:26:25 UTC (rev 10949)
@@ -106,8 +106,11 @@
endif
# A nifty macro to make testing gcc features easier
-check_gcc=$(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
- then echo "$(1)"; else echo "$(2)"; fi)
+check_gcc=$(shell \
+ if [ "$(1)" != "" ]; then \
+ if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
+ then echo "$(1)"; else echo "$(2)"; fi \
+ fi)
# Setup some shortcuts so that silent mode is silent like it should be
ifeq ($(subst s,,$(MAKEFLAGS)),$(MAKEFLAGS))
@@ -124,7 +127,7 @@
# for OPTIMIZATION...
# use '-Os' optimization if available, else use -O2
-OPTIMIZATION:=${call check_gcc,-Os,-O2}
+OPTIMIZATION:=$(call check_gcc,-Os,-O2)
# Some nice architecture specific optimizations
ifeq ($(strip $(TARGET_ARCH)),arm)
@@ -136,7 +139,7 @@
OPTIMIZATION+=$(call check_gcc,-falign-functions=0 -falign-jumps=0 -falign-loops=0,\
-malign-functions=0 -malign-jumps=0 -malign-loops=0)
endif
-OPTIMIZATIONS=$(OPTIMIZATION) -fomit-frame-pointer
+OPTIMIZATIONS:=$(OPTIMIZATION) -fomit-frame-pointer
#
#--------------------------------------------------------
More information about the busybox-cvs
mailing list