summaryrefslogtreecommitdiffstats
path: root/package/uboot-tools/uboot-tools-2012.04.01-hostcflags-override-fix.patch
blob: 0202eda9b4072fa9d160131999b42ddbc8a926ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[PATCH] Fix tools build with custom HOSTCFLAGS

We always need to append HOSTCPPFLAGS, even if HOSTCFLAGS have been
overridden on the cmdline.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 config.mk |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: u-boot-2011.03/config.mk
===================================================================
--- u-boot-2011.03.orig/config.mk
+++ u-boot-2011.03/config.mk
@@ -46,10 +46,12 @@
 
 #########################################################################
 
-HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
-		  $(HOSTCPPFLAGS)
+HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
 HOSTSTRIP	= strip
 
+# append CPPFLAGS even if CFLAGS has been overridden on cmdline
+override HOSTCFLAGS += $(HOSTCPPFLAGS)
+
 #
 # Mac OS X / Darwin's C preprocessor is Apple specific.  It
 # generates numerous errors and warnings.  We want to bypass it