[U-Boot] autoconf.mk.dep: use target cflags, not host

Submitted by Mike Frysinger on Oct. 13, 2011, 5:48 a.m.

Details

Message ID 1318484880-12910-1-git-send-email-vapier@gentoo.org
State Accepted
Commit 4c34b2a090b8418fd6b2e91b5e9dd8d36206384f
Delegated to: Wolfgang Denk
Headers show

Commit Message

Mike Frysinger Oct. 13, 2011, 5:48 a.m.
The current autoconf.mk.dep rule uses the host cflags when executing the
target compiler (which includes target header files).  We don't want to
mix the target compiler and host compiler flags, so change it to CFLAGS.
Otherwise we get things like -pedantic which the U-Boot source code does
not build with.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Wolfgang Denk Oct. 21, 2011, 11:20 p.m.
Dear Mike Frysinger,

In message <1318484880-12910-1-git-send-email-vapier@gentoo.org> you wrote:
> The current autoconf.mk.dep rule uses the host cflags when executing the
> target compiler (which includes target header files).  We don't want to
> mix the target compiler and host compiler flags, so change it to CFLAGS.
> Otherwise we get things like -pedantic which the U-Boot source code does
> not build with.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch hide | download patch | download mbox

diff --git a/Makefile b/Makefile
index 5db2e0e..385b4fe 100644
--- a/Makefile
+++ b/Makefile
@@ -503,7 +503,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 $(HOSTCFLAGS) $(CPPFLAGS) \
+	$(CC) -x c -DDO_DEPS_ONLY -M $(CFLAGS) $(CPPFLAGS) \
 		-MQ $(obj)include/autoconf.mk include/common.h > $@
 
 $(obj)include/autoconf.mk: $(obj)include/config.h