[U-Boot] [PATCH] tools: Makefile: improve cross_tools target usability

Stefan Müller-Klieser s.mueller-klieser at phytec.de
Mon Oct 31 14:15:08 CET 2016


When building the cross_tools target, HOSTCFLAGS and HOSTLDFLAGS will
propagate to the target build. This should not happen and is easy to
prevent.

Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser at phytec.de>
---
 tools/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/Makefile b/tools/Makefile
index 400588c..305336c 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -263,6 +263,8 @@ subdir- += env
 
 ifneq ($(CROSS_BUILD_TOOLS),)
 HOSTCC = $(CC)
+HOSTCFLAGS = $(CFLAGS)
+HOSTLDFLAGS = $(LDFLAGS)
 
 quiet_cmd_crosstools_strip = STRIP   $^
       cmd_crosstools_strip = $(STRIP) $^; touch $@
-- 
1.9.1



More information about the U-Boot mailing list