From fc8a50b1edc60204bb3d609e6b3095d66ce83645 Mon Sep 17 00:00:00 2001 From: Bernhard Rosenkraenzer Date: Tue, 6 Dec 2011 19:32:08 +0059 Subject: build/core: Bring back support for TARGET_EXTRA_CFLAGS This commit re-introduces support for setting TARGET_EXTRA_CFLAGS (such as -march=SomethingNotCompatibleWithOtherBoards) in board specific config files. Signed-off-by: Bernhard Rosenkraenzer --- core/combo/TARGET_linux-arm.mk | 2 +- core/config.mk | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index 8c8914329a..9000b866c8 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk @@ -149,7 +149,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 7a643b3f2a..235721465f 100644 --- a/core/config.mk +++ b/core/config.mk @@ -323,8 +323,11 @@ TARGET_PROJECT_INCLUDES:= $(SRC_HEADERS) $(TARGET_OUT_HEADERS) # Many host compilers don't support these flags, so we have to make # sure to only specify them for the target compilers checked in to # the source tree. -TARGET_GLOBAL_CFLAGS += $(TARGET_ERROR_FLAGS) -TARGET_GLOBAL_CPPFLAGS += $(TARGET_ERROR_FLAGS) +ifeq ($(TARGET_EXTRA_CPPFLAGS),) +TARGET_EXTRA_CPPFLAGS := $(TARGET_EXTRA_CFLAGS) +endif +TARGET_GLOBAL_CFLAGS += $(TARGET_ERROR_FLAGS) $(TARGET_EXTRA_CFLAGS) +TARGET_GLOBAL_CPPFLAGS += $(TARGET_ERROR_FLAGS) $(TARGET_EXTRA_CPPFLAGS) HOST_GLOBAL_CFLAGS += $(HOST_RELEASE_CFLAGS) HOST_GLOBAL_CPPFLAGS += $(HOST_RELEASE_CPPFLAGS) -- cgit v1.2.3