]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
make it possible to override CPPFLAGS from platform specific config.mk
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 9 Mar 2012 07:27:44 +0000 (08:27 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 9 Mar 2012 07:27:44 +0000 (08:27 +0100)
config.mk

index ddaa4775cd972a55623b6c783ce9b82f7b969d6e..b143ddb3f8ec9ba3b96edb0453adb794c2738905 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -218,20 +218,17 @@ CPPFLAGS += -I$(TOPDIR)/include
 CPPFLAGS += -fno-builtin -ffreestanding -nostdinc      \
        -isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS)
 
-ifdef BUILD_TAG
-CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes \
-       -DBUILD_TAG='"$(BUILD_TAG)"'
-else
-CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes
-endif
-
 CFLAGS_SSP := $(call cc-option,-fno-stack-protector)
-CFLAGS += $(CFLAGS_SSP)
+
 # Some toolchains enable security related warning flags by default,
 # but they don't make much sense in the u-boot world, so disable them.
 CFLAGS_WARN := $(call cc-option,-Wno-format-nonliteral) \
               $(call cc-option,-Wno-format-security)
-CFLAGS += $(CFLAGS_WARN)
+
+CFLAGS := $(CFLAGS_SSP) $(CFLAGS_WARN) $(CPPFLAGS) -Wall -Wstrict-prototypes
+ifdef BUILD_TAG
+       CFLAGS += -DBUILD_TAG='"$(BUILD_TAG)"'
+endif
 
 # $(CPPFLAGS) sets -g, which causes gcc to pass a suitable -g<format>
 # option to the assembler.