Skip to contentSkip to conversation

build: Pull -DBUILD_TAG into separate ifdef

PATCH In review Marek Vasut 3 participants 3 messages Apr 27, 2013 – May 10, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: Pull -DBUILD_TAG into separate ifdef

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.

Cc Wolfgang Denk <[email protected]>
Cc Tom Rini <[email protected]>
---
 config.mk |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
config.mk +3 -4
index 89a89f2..07b524d 100644
@@ -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)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 build: Pull -DBUILD_TAG into separate ifdef

Quoted 8 lines · Marek Vasut

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.

Cc Wolfgang Denk <[email protected]>
Cc Tom Rini <[email protected]>

--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

#2 lore raw
In reply to Marek Vasut
Quoted 9 lines · Marek Vasut

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130510/6293580f/attachment.pgp>