Skip to contentSkip to conversation

tools: allow to override python

PATCH New Stefano Babic 2 participants 4 messages Apr 5, 2017 – Apr 13, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: allow to override python

Not force to use python from PATH. Issue was noted when building with Yocto, because python from the distro is always taken instead of python-native built during Yocto process.

---
 Makefile       | 2 +-
 tools/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile +1 -1
index d44af78..592f90f 100644
@@ -348,7 +348,7 @@ OBJCOPY		= $(CROSS_COMPILE)objcopy
 OBJDUMP		= $(CROSS_COMPILE)objdump
 AWK		= awk
 PERL		= perl
-PYTHON		= python
+PYTHON		?= python
 DTC		= dtc
 CHECK		= sparse
 
tools/Makefile +1 -1
index e9cde02..14f5995 100644
@@ -120,7 +120,7 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
 libfdt:
 
 tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
-	LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= python $(srctree)/lib/libfdt/setup.py \
+	LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= ${PYTHON} $(srctree)/lib/libfdt/setup.py \
 		"$(_hostc_flags)" $^
 	mv _libfdt.so $@
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 tools: allow to override python

Quoted 10 lines · Stefano Babic

Not force to use python from PATH. Issue was noted when building with Yocto, because python from the distro is always taken instead of python-native built during Yocto process.

---
 Makefile       | 2 +-
 tools/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

FYI the proper setup.py support just landed upstream so we could move to using that to build _libfdt.so

Regards,
Simon

#2 lore raw

PATCH 1/1 tools: allow to override python

Quoted 12 lines · Simon Glass
Quoted 10 lines · Stefano Babic

Not force to use python from PATH. Issue was noted when building with Yocto, because python from the distro is always taken instead of python-native built during Yocto process.

---
 Makefile       | 2 +-
 tools/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines

FYI the proper setup.py support just landed upstream so we could move to using that to build _libfdt.so

Great news !

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 1/1 tools: allow to override python

Quoted 13 lines · Stefano Babic
Quoted 12 lines · Simon Glass
Quoted 10 lines · Stefano Babic

Not force to use python from PATH. Issue was noted when building with Yocto, because python from the distro is always taken instead of python-native built during Yocto process.

---
 Makefile       | 2 +-
 tools/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 6 lines
Quoted 4 lines

FYI the proper setup.py support just landed upstream so we could move to using that to build _libfdt.so

Great news !

Applied to u-boot-dm, thanks!