aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-07-28 19:38:52 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-07-28 19:38:52 +0000
commitc7444d704193ba89f522d4e0ce8e5933beec793d (patch)
tree3840ac77ae5abb717763426cbce8a212095c3bf3
parentdbcb8958266ccf757d5c29db0cade9c702f944de (diff)
downloadbusybox-w32-c7444d704193ba89f522d4e0ce8e5933beec793d.tar.gz
busybox-w32-c7444d704193ba89f522d4e0ce8e5933beec793d.tar.bz2
busybox-w32-c7444d704193ba89f522d4e0ce8e5933beec793d.zip
From Rich Paul:
I've noticed that when I compile busybox on my laptop, it compiles more slowly than one would expect, and although it's a (more-or-less) multiprocessor system and I use -j5, make never seems to run more than one job at a time. I believe I have found the culprit:  each time a file is compiled, gcc runs about 5 times.  This is because the $(check_gcc) macros and the TARGET_ARCH macros are late binding. The attached patch cuts the compilation time by 66%, from 1.5 minutes to 30 seconds.  Your mileage may very.  These statements have not been evaluated by the FDA. git-svn-id: svn://busybox.net/trunk/busybox@10945 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--Rules.mak5
1 files changed, 2 insertions, 3 deletions
diff --git a/Rules.mak b/Rules.mak
index 6a2e17ad7..ec03ce011 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -86,7 +86,7 @@ ARFLAGS=cru
86#-------------------------------------------------------- 86#--------------------------------------------------------
87export VERSION BUILDTIME TOPDIR HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP 87export VERSION BUILDTIME TOPDIR HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP
88ifeq ($(strip $(TARGET_ARCH)),) 88ifeq ($(strip $(TARGET_ARCH)),)
89TARGET_ARCH=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \ 89TARGET_ARCH:=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
90 -e 's/i.86/i386/' \ 90 -e 's/i.86/i386/' \
91 -e 's/sparc.*/sparc/' \ 91 -e 's/sparc.*/sparc/' \
92 -e 's/arm.*/arm/g' \ 92 -e 's/arm.*/arm/g' \
@@ -115,8 +115,7 @@ check_gcc=$(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1;
115# for OPTIMIZATION... 115# for OPTIMIZATION...
116 116
117# use '-Os' optimization if available, else use -O2 117# use '-Os' optimization if available, else use -O2
118OPTIMIZATION= 118OPTIMIZATION:=${call check_gcc,-Os,-O2}
119OPTIMIZATION=${call check_gcc,-Os,-O2}
120 119
121# Some nice architecture specific optimizations 120# Some nice architecture specific optimizations
122ifeq ($(strip $(TARGET_ARCH)),arm) 121ifeq ($(strip $(TARGET_ARCH)),arm)