[U-Boot] [PATCH] unify HOST_CFLAGS and HOSTCFLAGS

Mike Frysinger vapier at gentoo.org
Sun Jul 19 21:17:03 CEST 2009


The top build system sets up HOSTCFLAGS a bit and exports it, but other
places use HOST_CFLAGS instead.  Unify the two as HOSTCFLAGS so that the
values stay in sync.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 Makefile                             |    2 +-
 board/fads/config.mk                 |    2 +-
 board/netstar/Makefile               |    8 ++++----
 board/spc1920/config.mk              |    2 +-
 board/xilinx/ml300/Makefile          |    2 +-
 board/xilinx/ppc405-generic/Makefile |    2 +-
 board/xilinx/ppc440-generic/Makefile |    2 +-
 cpu/ixp/npe/Makefile                 |    2 +-
 drivers/bios_emulator/Makefile       |    2 +-
 drivers/net/sk98lin/Makefile         |    2 +-
 rules.mk                             |    2 +-
 tools/Makefile                       |   12 ++++++------
 tools/gdb/Makefile                   |    2 +-
 tools/imls/Makefile                  |    4 ++--
 14 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/Makefile b/Makefile
index e427bc0..37a4564 100644
--- a/Makefile
+++ b/Makefile
@@ -469,7 +469,7 @@ $(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
 	@$(XECHO) Generating $@ ; \
 	set -e ; \
 	: Generate the dependancies ; \
-	$(CC) -x c -DDO_DEPS_ONLY -M $(HOST_CFLAGS) $(CPPFLAGS) \
+	$(CC) -x c -DDO_DEPS_ONLY -M $(HOSTCFLAGS) $(CPPFLAGS) \
 		-MQ $(obj)include/autoconf.mk include/common.h > $@
 
 $(obj)include/autoconf.mk: $(obj)include/config.h
diff --git a/board/fads/config.mk b/board/fads/config.mk
index 621b9a2..6106090 100644
--- a/board/fads/config.mk
+++ b/board/fads/config.mk
@@ -30,5 +30,5 @@
 
 TEXT_BASE = 0xFE000000
 PLATFORM_CPPFLAGS += -I$(TOPDIR)/board/fads
-HOST_CFLAGS += -I$(TOPDIR)/board/fads
+HOSTCFLAGS += -I$(TOPDIR)/board/fads
 HOST_ENVIRO_CFLAGS += -I$(TOPDIR)/board/fads
diff --git a/board/netstar/Makefile b/board/netstar/Makefile
index 91bac38..d5fe819 100644
--- a/board/netstar/Makefile
+++ b/board/netstar/Makefile
@@ -42,7 +42,7 @@ LOAD_ADDR = 0x10400000
 LDSCRIPT = $(TOPDIR)/board/$(BOARDDIR)/eeprom.lds
 lnk = $(if $(obj),$(obj),.)
 
-HOST_CFLAGS = -Wall -pedantic -I$(TOPDIR)/include
+HOSTCFLAGS = -Wall -pedantic -I$(TOPDIR)/include
 
 all:	$(obj).depend $(LIB) $(obj)eeprom.srec $(obj)eeprom.bin \
 		$(obj)crcek.srec $(obj)crcek.bin $(obj)crcit
@@ -70,13 +70,13 @@ $(obj)crcek.bin:	$(obj)crcek.srec
 	$(OBJCOPY) -I srec -O binary $< $@ 2>/dev/null
 
 $(obj)crcit:		$(obj)crcit.o $(obj)crc32.o
-	$(HOSTCC) $(HOST_CFLAGS) -o $@ $^
+	$(HOSTCC) $(HOSTCFLAGS) -o $@ $^
 
 $(obj)crcit.o:	crcit.c
-	$(HOSTCC) $(HOST_CFLAGS) -o $@ -c $<
+	$(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
 
 $(obj)crc32.o:	$(SRCTREE)/lib_generic/crc32.c
-	$(HOSTCC) $(HOST_CFLAGS) -DUSE_HOSTCC -o $@ -c $<
+	$(HOSTCC) $(HOSTCFLAGS) -DUSE_HOSTCC -o $@ -c $<
 
 clean:
 	rm -f $(SOBJS) $(OBJS) $(obj)eeprom $(obj)eeprom.srec \
diff --git a/board/spc1920/config.mk b/board/spc1920/config.mk
index e361694..8dacc17 100644
--- a/board/spc1920/config.mk
+++ b/board/spc1920/config.mk
@@ -31,5 +31,5 @@
 #TEXT_BASE = 0xFE000000
 TEXT_BASE = 0xFFF00000
 PLATFORM_CPPFLAGS += -I$(TOPDIR)/board/spc1920
-HOST_CFLAGS += -I$(TOPDIR)/board/spc1920
+HOSTCFLAGS += -I$(TOPDIR)/board/spc1920
 HOST_ENVIRO_CFLAGS += -I$(TOPDIR)/board/spc1920
diff --git a/board/xilinx/ml300/Makefile b/board/xilinx/ml300/Makefile
index 9215d77..b8a2d64 100644
--- a/board/xilinx/ml300/Makefile
+++ b/board/xilinx/ml300/Makefile
@@ -30,7 +30,7 @@ endif
 
 INCS		:= -I../common -I../xilinx_enet -I../xilinx_iic
 CFLAGS		+= $(INCS)
-HOST_CFLAGS	+= $(INCS)
+HOSTCFLAGS	+= $(INCS)
 
 LIB	= $(obj)lib$(BOARD).a
 
diff --git a/board/xilinx/ppc405-generic/Makefile b/board/xilinx/ppc405-generic/Makefile
index b56bb49..4e87e4b 100644
--- a/board/xilinx/ppc405-generic/Makefile
+++ b/board/xilinx/ppc405-generic/Makefile
@@ -31,7 +31,7 @@ endif
 
 INCS		:=
 CFLAGS		+= $(INCS)
-HOST_CFLAGS	+= $(INCS)
+HOSTCFLAGS	+= $(INCS)
 
 LIB	= $(obj)lib$(BOARD).a
 
diff --git a/board/xilinx/ppc440-generic/Makefile b/board/xilinx/ppc440-generic/Makefile
index bf0a6ba..11a8f69 100644
--- a/board/xilinx/ppc440-generic/Makefile
+++ b/board/xilinx/ppc440-generic/Makefile
@@ -31,7 +31,7 @@ endif
 
 INCS		:=
 CFLAGS		+= $(INCS)
-HOST_CFLAGS	+= $(INCS)
+HOSTCFLAGS	+= $(INCS)
 
 LIB	= $(obj)lib$(BOARD).a
 
diff --git a/cpu/ixp/npe/Makefile b/cpu/ixp/npe/Makefile
index f4f97bd..8fefd29 100644
--- a/cpu/ixp/npe/Makefile
+++ b/cpu/ixp/npe/Makefile
@@ -27,7 +27,7 @@ LIB := $(obj)libnpe.a
 
 LOCAL_CFLAGS  += -I$(TOPDIR)/cpu/ixp/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux
 CFLAGS  += $(LOCAL_CFLAGS)
-HOST_CFLAGS  += $(LOCAL_CFLAGS)
+HOSTCFLAGS  += $(LOCAL_CFLAGS)
 
 COBJS-$(CONFIG_IXP4XX_NPE) := npe.o \
 	miiphy.o \
diff --git a/drivers/bios_emulator/Makefile b/drivers/bios_emulator/Makefile
index c73da97..dd9c102 100644
--- a/drivers/bios_emulator/Makefile
+++ b/drivers/bios_emulator/Makefile
@@ -22,7 +22,7 @@ EXTRA_CFLAGS += -I. -I./include -I$(TOPDIR)/include \
 	-D__PPC__  -D__BIG_ENDIAN__
 
 CFLAGS += $(EXTRA_CFLAGS)
-HOST_CFLAGS += $(EXTRA_CFLAGS)
+HOSTCFLAGS += $(EXTRA_CFLAGS)
 
 all:	$(LIB)
 
diff --git a/drivers/net/sk98lin/Makefile b/drivers/net/sk98lin/Makefile
index f1bc4a7..4a3ead3 100644
--- a/drivers/net/sk98lin/Makefile
+++ b/drivers/net/sk98lin/Makefile
@@ -90,7 +90,7 @@ endif
 EXTRA_CFLAGS += -I. -DSK_USE_CSUM $(DBGDEF)
 
 CFLAGS += $(EXTRA_CFLAGS)
-HOST_CFLAGS += $(EXTRA_CFLAGS)
+HOSTCFLAGS += $(EXTRA_CFLAGS)
 
 
 all:	$(LIB)
diff --git a/rules.mk b/rules.mk
index a77451b..6f999dd 100644
--- a/rules.mk
+++ b/rules.mk
@@ -29,7 +29,7 @@ $(obj).depend:	$(src)Makefile $(TOPDIR)/config.mk $(SRCS)
 		@rm -f $@
 		@for f in $(SRCS); do \
 			g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
-			$(CC) -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
+			$(CC) -M $(HOSTCFLAGS) $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
 		done
 
 #########################################################################
diff --git a/tools/Makefile b/tools/Makefile
index 5c764bb..b5a1e39 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -36,18 +36,18 @@ TOOLSUBDIRS =
 # -multiply_defined suppress option to turn off this error.
 #
 
-HOST_CFLAGS = -Wall
+HOSTCFLAGS = -Wall
 HOST_LDFLAGS =
 
 ifeq ($(HOSTOS)-$(HOSTARCH),darwin-ppc)
-HOST_CFLAGS += -traditional-cpp
+HOSTCFLAGS += -traditional-cpp
 HOST_LDFLAGS += -multiply_defined suppress
 else
-HOST_CFLAGS += -pedantic
+HOSTCFLAGS += -pedantic
 endif
 
 ifeq ($(HOSTOS),cygwin)
-HOST_CFLAGS += -ansi
+HOSTCFLAGS += -ansi
 endif
 
 #
@@ -148,7 +148,7 @@ CPPFLAGS   = -idirafter $(SRCTREE)/include \
 		-I $(SRCTREE)/tools \
 		-DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC \
 		-D__KERNEL_STRICT_NAMES
-CFLAGS     = $(HOST_CFLAGS) $(CPPFLAGS) -O
+CFLAGS     = $(HOSTCFLAGS) $(CPPFLAGS) -O
 
 # No -pedantic switch to avoid libfdt compilation warnings
 FIT_CFLAGS = -Wall $(CPPFLAGS) -O
@@ -227,7 +227,7 @@ else
 	    $(MAKE) \
 		HOSTOS=$(HOSTOS) \
 		HOSTARCH=$(HOSTARCH) \
-		HOST_CFLAGS="$(HOST_CFLAGS)" \
+		HOSTCFLAGS="$(HOSTCFLAGS)" \
 		HOST_LDFLAGS="$(HOST_LDFLAGS)" \
 		-C $$dir || exit 1 ; \
 	done
diff --git a/tools/gdb/Makefile b/tools/gdb/Makefile
index c44cc8a..0a5687d 100644
--- a/tools/gdb/Makefile
+++ b/tools/gdb/Makefile
@@ -38,7 +38,7 @@ BINS	:= $(addprefix $(obj),$(BINS))
 # Use native tools and options
 #
 CPPFLAGS   = -I$(BFD_ROOT_DIR)/include
-CFLAGS     = $(HOST_CFLAGS) -O $(CPPFLAGS)
+CFLAGS     = $(HOSTCFLAGS) -O $(CPPFLAGS)
 CC	   = $(HOSTCC)
 MAKEDEPEND = makedepend
 
diff --git a/tools/imls/Makefile b/tools/imls/Makefile
index 04ab31a..59b928c 100644
--- a/tools/imls/Makefile
+++ b/tools/imls/Makefile
@@ -19,7 +19,7 @@
 
 include $(TOPDIR)/config.mk
 
-HOST_CFLAGS = -Wall -pedantic
+HOSTCFLAGS = -Wall -pedantic
 
 # Generated executable files
 BIN_FILES-y += imls
@@ -57,7 +57,7 @@ CPPFLAGS   = -idirafter $(SRCTREE)/include \
 	        -I $(SRCTREE)/libfdt \
 		-I $(SRCTREE)/tools \
 		-DUSE_HOSTCC -D__KERNEL_STRICT_NAMES
-CFLAGS     = $(HOST_CFLAGS) $(CPPFLAGS) -O
+CFLAGS     = $(HOSTCFLAGS) $(CPPFLAGS) -O
 
 # No -pedantic switch to avoid libfdt compilation warnings
 FIT_CFLAGS = -Wall $(CPPFLAGS) -O
-- 
1.6.3.3



More information about the U-Boot mailing list