diff mbox

[U-Boot] build: Pull -DBUILD_TAG into separate ifdef

Message ID 1367085011-20332-1-git-send-email-marex@denx.de
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Marek Vasut April 27, 2013, 5:50 p.m. UTC
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>
---
 config.mk |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Otavio Salvador April 27, 2013, 6:26 p.m. UTC | #1
On Sat, Apr 27, 2013 at 2:50 PM, Marek Vasut <marex@denx.de> wrote:
> 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>

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
Tom Rini May 10, 2013, 7:57 p.m. UTC | #2
On Sat, Apr 27, 2013 at 07:50:11AM -0000, Marek Vasut wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/config.mk b/config.mk
index 89a89f2..07b524d 100644
--- 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)