Skip to contentSkip to conversation

tools: Correct python building host tools

PATCH In review Tom Rini 3 participants 4 messages Jan 23, 2017 – Jan 25, 2017

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 tools: Correct python building host tools

When we have python building tools for the host it will not check HOSTXX variables but only XX variables, for example LDFLAGS and not HOSTLDFLAGS.

Cc Simon Glass <[email protected]>
Fixes 1905c8fc711a ("build: Always build the libfdt python module")
---
 tools/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/Makefile +2 -1
index a609d058595b..cefcedf683ca 100644
@@ -117,7 +117,8 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
 libfdt:
 
 tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
-	python $(srctree)/lib/libfdt/setup.py "$(_hostc_flags)" $^
+	LDFLAGS="$(HOSTLDFLAGS)" python $(srctree)/lib/libfdt/setup.py \
+		"$(_hostc_flags)" $^
 	mv _libfdt.so $@
 
 tools/libfdt_wrap.c: $(srctree)/lib/libfdt/libfdt.swig
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 tools: Correct python building host tools

Quoted 27 lines · Tom Rini

When we have python building tools for the host it will not check HOSTXX variables but only XX variables, for example LDFLAGS and not HOSTLDFLAGS.

Cc Simon Glass <[email protected]>
Fixes 1905c8fc711a ("build: Always build the libfdt python module")
---
 tools/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/Makefile +2 -2
index a609d058595b..cefcedf683ca 100644
@@ -117,7 +117,8 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
 libfdt:
 
 tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
-       python $(srctree)/lib/libfdt/setup.py "$(_hostc_flags)" $^
+       LDFLAGS="$(HOSTLDFLAGS)" python $(srctree)/lib/libfdt/setup.py \
+               "$(_hostc_flags)" $^
        mv _libfdt.so $@
 
 tools/libfdt_wrap.c: $(srctree)/lib/libfdt/libfdt.swig
--
Quoted 2 lines

1.9.1

Tested on 5 PowerPC builds:

Thanks Tom!

- Simon

#2 lore raw

PATCH 1/1 tools: Correct python building host tools

In reply to Tom Rini

Hello Tom,

Am 23.01.2017 um 17:44 schrieb Tom Rini:

Quoted 11 lines

When we have python building tools for the host it will not check HOSTXX variables but only XX variables, for example LDFLAGS and not HOSTLDFLAGS.

Cc Simon Glass <[email protected]>
Fixes 1905c8fc711a ("build: Always build the libfdt python module")
---
  tools/Makefile | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Thanks! This fixes the build for the tqm5200 board.

bye,
Heiko

Quoted 16 lines
tools/Makefile +2 -1
index a609d058595b..cefcedf683ca 100644
@@ -117,7 +117,8 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
  libfdt:
 
  tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
-	python $(srctree)/lib/libfdt/setup.py "$(_hostc_flags)" $^
+	LDFLAGS="$(HOSTLDFLAGS)" python $(srctree)/lib/libfdt/setup.py \
+		"$(_hostc_flags)" $^
  	mv _libfdt.so $@
 
  tools/libfdt_wrap.c: $(srctree)/lib/libfdt/libfdt.swig
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
author
#3 lore raw
In reply to Tom Rini
Quoted 11 lines · Tom Rini

When we have python building tools for the host it will not check HOSTXX variables but only XX variables, for example LDFLAGS and not HOSTLDFLAGS.

Cc Simon Glass <[email protected]>
Fixes 1905c8fc711a ("build: Always build the libfdt python module")

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170124/ddf1c485/attachment.sig>