From a899b909abe14e8e35a81997c828201d1beaff78 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 27 Nov 2011 00:15:07 -0500 Subject: buildsys: cache build flags in vars Running `make clean` atm takes like 20 seconds because every subdir re-evaluates all the toolchain flags. Add some helpers to automate the process of setting up variables to cache the result of tests, as well as the checking of an already set flag. Now `make clean` takes like 2 seconds on my system. Signed-off-by: Mike Frysinger --- test/Rules.mak | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/Rules.mak b/test/Rules.mak index 2131a7b18..4b4345eae 100644 --- a/test/Rules.mak +++ b/test/Rules.mak @@ -57,7 +57,8 @@ endif endif XCOMMON_CFLAGS := -I$(top_builddir)test -D_GNU_SOURCE -XWARNINGS += $(call check_gcc,-Wstrict-prototypes,) +CFLAG_-Wstrict-prototypes ?= $(call check_gcc,-Wstrict-prototypes,) +XWARNINGS += $(CFLAG_-Wstrict-prototypes) CFLAGS := -nostdinc -I$(top_builddir)$(LOCAL_INSTALL_PATH)/usr/include CFLAGS += $(XCOMMON_CFLAGS) $(KERNEL_INCLUDES) $(CC_INC) CFLAGS += $(OPTIMIZATION) $(CPU_CFLAGS) $(XWARNINGS) -- cgit v1.2.3