From: Stefano Babic Date: Tue, 4 Apr 2017 10:53:00 +0200 Subject: [U-Boot] [PATCH] libfdt: fix build with Python 3 In-Reply-To: <75845614f03ce96f25f9206a178e5033@agner.ch> References: <20170329194123.2361-1-stefan@agner.ch> <75845614f03ce96f25f9206a178e5033@agner.ch> Message-ID: <53ee8ef7-0095-e795-d549-113b5fcbd86f@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan, On 03/04/2017 23:02, Stefan Agner wrote: > But then, I don't expect that "/usr/bin/env python" is looking at > PYTHON. > > As far as I understand env, it just looks up the current environment to > run its COMMAND argument. Agree, this is also mz understanding. > It is helpful as a shebang, but it does not > seem to make any difference to calling "python" directly (since that > also just looks up the current environment PATH and executes the first > python it finds... Agree - so that is disturbing is the fix calls to "python" inside Makefile. That means it remains to change: tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= python $(srctree)/lib/libfdt/setup.py to: tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= ${PYTHON} $(srctree)/lib/libfdt/setup.py Regards, Stefano -- ===================================================================== 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 =====================================================================