scripts: pylibfdt: add a new include path
PATCH 1/1 scripts: pylibfdt: add a new include path
From: Peng Fan <[email protected]>
Opensuse python headers are under:
=>ls /usr/include/python
python@ python2.7/ python3.6m/ python3.8/ python3.9/
So add '-I/usr/include/python' to fix build on Opensuse Host. It should not hurt with other Host
--- scripts/dtc/pylibfdt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/dtc/pylibfdt/Makefile +1 -1
@@ -18,7 +18,7 @@ quiet_cmd_pymod = PYMOD $@ CC="$(HOSTCC)" LDSHARED="$(HOSTCC) -shared " \ LDFLAGS="$(HOSTLDFLAGS)" \ VERSION="u-boot-$(UBOOTVERSION)" \ - CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \ + CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir) -I/usr/include/python" OBJDIR=$(obj) \ SOURCES="$(PYLIBFDT_srcs)" \ SWIG_OPTS="-I$(LIBFDT_srcdir) -I$(LIBFDT_srcdir)/.." \ $(PYTHON3) $< --quiet build_ext --inplace
Signature · 1 line
2.30.0
Quoted 19 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
Opensuse python headers are under:
=>ls/usr/include/python
python@ python2.7/ python3.6m/ python3.8/ python3.9/So add '-I/usr/include/python' to fix build on Opensuse Host. It should not hurt with other Host
Signed-off-by Peng Fan <[email protected]>--- scripts/dtc/pylibfdt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/dtc/pylibfdt/Makefile +0
-0
scripts/dtc/pylibfdt/Makefile quiet_cmd_pymod = PYMOD $@ · line 24
Quoted 8 lines
scripts/dtc/pylibfdt/Makefile +1
-1@@ -18,7 +18,7 @@ quiet_cmd_pymod = PYMOD $@ CC="$(HOSTCC)" LDSHARED="$(HOSTCC) -shared " \ LDFLAGS="$(HOSTLDFLAGS)" \ VERSION="u-boot-$(UBOOTVERSION)" \ - CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \ + CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir) -I/usr/include/python" OBJDIR=$(obj) \ SOURCES="$(PYLIBFDT_srcs)" \ SWIG_OPTS="-I$(LIBFDT_srcdir) -I$(LIBFDT_srcdir)/.." \ $(PYTHON3) $< --quiet build_ext --inplace
We should probably, somewhere, be using something like "pkg-config --cflags python3" to find out where to include. Hard-coded /usr paths are bad for environments like OpenEmbedded and generally non-portable.
Signature · 1 line
Tom