From cca4e4aec1fe52e5ecd15e3cebdbb36e2f254220 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 1 Nov 2011 20:54:02 +0000 Subject: Reduce build times U-Boot Makefiles contain a number of tests for compiler features etc. which so far are executed again and again. On some architectures (especially ARM) this results in a large number of calls to gcc. This patch makes sure to run such tests only once, thus largely reducing the number of "execve" system calls. Example: number of "execve" system calls for building the "P2020DS" (Power Architecture) and "qong" (ARM) boards, measured as: -> strace -f -e trace=execve -o /tmp/foo ./MAKEALL -> grep execve /tmp/foo | wc -l Before: After: Reduction: ================================== P2020DS 20555 15205 -26% qong 31692 14490 -54% As a result, built times are significantly reduced, typically by 30...50%. Signed-off-by: Wolfgang Denk Cc: Andy Fleming Cc: Kumar Gala Cc: Albert Aribaud cc: Graeme Russ cc: Mike Frysinger Tested-by: Graeme Russ Tested-by: Matthias Weisser Tested-by: Sanjeev Premi Tested-by: Simon Glass Tested-by: Macpaul Lin Acked-by: Mike Frysinger --- arch/arm/config.mk | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'arch/arm/config.mk') diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 9b4e581b2d..45f9dca5d5 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -34,7 +34,7 @@ endif PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__ # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: -PLATFORM_CPPFLAGS += $(call cc-option,-marm,) +PF_CPPFLAGS_ARM := $(call cc-option,-marm,) # Try if EABI is supported, else fall back to old API, # i. e. for example: @@ -44,15 +44,16 @@ PLATFORM_CPPFLAGS += $(call cc-option,-marm,) # -mabi=apcs-gnu -mno-thumb-interwork # - with ELDK 3.1 (gcc 3.x), use: # -mapcs-32 -mno-thumb-interwork -PLATFORM_CPPFLAGS += $(call cc-option,\ - -mabi=aapcs-linux -mno-thumb-interwork,\ +PF_CPPFLAGS_ABI := $(call cc-option,\ + -mabi=aapcs-linux -mno-thumb-interwork,\ + $(call cc-option,\ + -mapcs-32,\ $(call cc-option,\ - -mapcs-32,\ - $(call cc-option,\ - -mabi=apcs-gnu,\ - )\ - ) $(call cc-option,-mno-thumb-interwork,)\ - ) + -mabi=apcs-gnu,\ + )\ + ) $(call cc-option,-mno-thumb-interwork,)\ + ) +PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI) # For EABI, make sure to provide raise() ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) -- cgit v1.2.1