diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2012-07-14 14:13:55 +0159 |
---|---|---|
committer | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2013-02-04 14:45:37 +0100 |
commit | 75d1dd69c75d91257f002568f64d8165059847c1 (patch) | |
tree | 35d56230380f323174d9c2899c9c530d1839a8f2 | |
parent | f7ba7f75a8dcee2b732c5bbf3c6b842201b77a52 (diff) | |
download | build-75d1dd69c75d91257f002568f64d8165059847c1.tar.gz |
build: Add support for TARGET_EXTRA_C{,PP}FLAGS
Add support for setting TARGET_EXTRA_C{,PP}FLAGS in board configs.
This can be used to set compiler flags for a board that break other
boards, such as -march=cortex-a9 or -DUSE_CUSTOM_EXTENSIONS_FOR_XYZ
Change-Id: I0efd4e37578bf6d239bf56dfeeaaed44840ee3af
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r-- | core/combo/TARGET_linux-arm.mk | 2 | ||||
-rw-r--r-- | core/config.mk | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index bc781743fa..f712b8cd9a 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk @@ -160,7 +160,7 @@ endif TARGET_GLOBAL_CPPFLAGS += -fvisibility-inlines-hidden # More flags/options can be added here -TARGET_RELEASE_CFLAGS := \ +TARGET_RELEASE_CFLAGS += \ -DNDEBUG \ -g \ -Wstrict-aliasing=2 \ diff --git a/core/config.mk b/core/config.mk index 534dd98f76..4cab27bb22 100644 --- a/core/config.mk +++ b/core/config.mk @@ -402,11 +402,15 @@ TARGET_PROJECT_INCLUDES:= $(SRC_HEADERS) $(TARGET_OUT_HEADERS) \ TARGET_GLOBAL_CFLAGS += $(TARGET_ERROR_FLAGS) TARGET_GLOBAL_CPPFLAGS += $(TARGET_ERROR_FLAGS) +ifeq($(TARGET_EXTRA_CPPFLAGS),) +TARGET_EXTRA_CPPFLAGS := $(TARGET_EXTRA_CFLAGS) +endif + HOST_GLOBAL_CFLAGS += $(HOST_RELEASE_CFLAGS) HOST_GLOBAL_CPPFLAGS += $(HOST_RELEASE_CPPFLAGS) -TARGET_GLOBAL_CFLAGS += $(TARGET_RELEASE_CFLAGS) -TARGET_GLOBAL_CPPFLAGS += $(TARGET_RELEASE_CPPFLAGS) +TARGET_GLOBAL_CFLAGS += $(TARGET_RELEASE_CFLAGS) $(TARGET_EXTRA_CFLAGS) +TARGET_GLOBAL_CPPFLAGS += $(TARGET_RELEASE_CPPFLAGS) $(TARGET_EXTRA_CPPFLAGS) # define llvm tools and global flags include $(BUILD_SYSTEM)/llvm_config.mk |