[U-Boot] [PATCH v2] config.mk: use memoization in cc-option macro to speed up compilation
Daniel Schwierzeck
daniel.schwierzeck at googlemail.com
Fri Nov 4 18:31:02 CET 2011
Hi Albert, Wolfgang,
following code from arch/arm/config does not work correctly with my optimization
PF_CPPFLAGS_ABI := $(call cc-option,\
-mabi=aapcs-linux -mno-thumb-interwork,\
$(call cc-option,\
-mapcs-32,\
$(call cc-option,\
-mabi=apcs-gnu,\
)\
) $(call cc-option,-mno-thumb-interwork,)\
)
PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI)
Compiling with seabord_config and latest CodeSourcery toolchain the
generated cache file
has following content:
CC_OPTIONS += -marm
CC_OPTIONS += -mabi=apcs-gnu
CC_OPTIONS_NOP += -mabi=apcs-gnu
CC_OPTIONS += -mno-thumb-interwork
CC_OPTIONS += -mabi=aapcs-linux -mno-thumb-interwork
CC_OPTIONS += -fno-stack-protector
CC_OPTIONS += -Wno-format-nonliteral
CC_OPTIONS += -Wno-format-security
CC_OPTIONS += -fno-toplevel-reorder
If I rewrite that code to
PF_CPPFLAGS_ABI := $(call cc-option,-mabi=aapcs-linux,)
ifeq ($(PF_CPPFLAGS_ABI),)
PF_CPPFLAGS_ABI := $(call cc-option,-mapcs-32,-mabi=apcs-gnu)
endif
PF_CPPFLAGS_THUMB := $(call cc-option,-mno-thumb-interwork,)
PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI) $(PF_CPPFLAGS_THUMB)
the cache file looks better:
CC_OPTIONS += -marm
CC_OPTIONS += -mabi=aapcs-linux
CC_OPTIONS += -mno-thumb-interwork
CC_OPTIONS += -fno-stack-protector
CC_OPTIONS += -Wno-format-nonliteral
CC_OPTIONS += -Wno-format-security
CC_OPTIONS += -fno-toplevel-reorder
Should we change it? is the semantic still the same?
Best regards,
Daniel
More information about the U-Boot
mailing list