build: Pull -DBUILD_TAG into separate ifdef
authorMarek Vasut <marex@denx.de>
Sat, 27 Apr 2013 07:50:11 +0000 (07:50 +0000)
committerTom Rini <trini@ti.com>
Thu, 9 May 2013 21:03:04 +0000 (17:03 -0400)
Currently the base setting for CFLAGS is split in two possibilities,
one with -DBUILD_TAG appended at the end and one without, the rest of
CFLAGS is the same in both cases. Change this so CFLAGS are always set
and the -DBUILD_TAG is appended in separate ifdef.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
config.mk

index b427a4eed0c6f05a74308592652826fdf3b06426..ddf350e8e9ce5788a9f3e021ada5d3966092b2c6 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -250,11 +250,10 @@ 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
+
+ifdef BUILD_TAG
+CFLAGS += -DBUILD_TAG='"$(BUILD_TAG)"'
 endif
 
 CFLAGS_SSP := $(call cc-option,-fno-stack-protector)