diff mbox

[U-Boot] tools: allow to override python

Message ID 1491407201-6049-1-git-send-email-sbabic@denx.de
State Accepted
Commit b48bfc74ee410b1e6681c620633ffef32aafaba0
Delegated to: Simon Glass
Headers show

Commit Message

Stefano Babic April 5, 2017, 3:46 p.m. UTC
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.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Simon Glass <sjg@chromium.org>
---
 Makefile       | 2 +-
 tools/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass April 9, 2017, 7:27 p.m. UTC | #1
On 5 April 2017 at 09:46, Stefano Babic <sbabic@denx.de> wrote:
> 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.
>
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> CC: Simon Glass <sjg@chromium.org>
> ---
>  Makefile       | 2 +-
>  tools/Makefile | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

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

Regards,
Simon
Stefano Babic April 10, 2017, 8:08 a.m. UTC | #2
On 09/04/2017 21:27, Simon Glass wrote:
> On 5 April 2017 at 09:46, Stefano Babic <sbabic@denx.de> wrote:
>> 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.
>>
>> Signed-off-by: Stefano Babic <sbabic@denx.de>
>> CC: Simon Glass <sjg@chromium.org>
>> ---
>>  Makefile       | 2 +-
>>  tools/Makefile | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> FYI the proper setup.py support just landed upstream so we could move
> to using that to build _libfdt.so

Great news !

Regards,
Stefano
Simon Glass April 13, 2017, 9:16 p.m. UTC | #3
On 10 April 2017 at 02:08, Stefano Babic <sbabic@denx.de> wrote:
> On 09/04/2017 21:27, Simon Glass wrote:
>> On 5 April 2017 at 09:46, Stefano Babic <sbabic@denx.de> wrote:
>>> 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.
>>>
>>> Signed-off-by: Stefano Babic <sbabic@denx.de>
>>> CC: Simon Glass <sjg@chromium.org>
>>> ---
>>>  Makefile       | 2 +-
>>>  tools/Makefile | 2 +-
>>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>
>> 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!
diff mbox

Patch

diff --git a/Makefile b/Makefile
index d44af78..592f90f 100644
--- a/Makefile
+++ b/Makefile
@@ -348,7 +348,7 @@  OBJCOPY		= $(CROSS_COMPILE)objcopy
 OBJDUMP		= $(CROSS_COMPILE)objdump
 AWK		= awk
 PERL		= perl
-PYTHON		= python
+PYTHON		?= python
 DTC		= dtc
 CHECK		= sparse
 
diff --git a/tools/Makefile b/tools/Makefile
index e9cde02..14f5995 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -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 $@