All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts: pylibfdt: add a new include path
@ 2021-10-13  9:39 Peng Fan (OSS)
  2021-10-13 13:12 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan (OSS) @ 2021-10-13  9:39 UTC (permalink / raw)
  To: sjg, trini; +Cc: u-boot, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

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 <peng.fan@nxp.com>
---
 scripts/dtc/pylibfdt/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile
index 493995e303..698790a1a0 100644
--- a/scripts/dtc/pylibfdt/Makefile
+++ b/scripts/dtc/pylibfdt/Makefile
@@ -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
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scripts: pylibfdt: add a new include path
  2021-10-13  9:39 [PATCH] scripts: pylibfdt: add a new include path Peng Fan (OSS)
@ 2021-10-13 13:12 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2021-10-13 13:12 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sjg, u-boot, Peng Fan

[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]

On Wed, Oct 13, 2021 at 05:39:52PM +0800, Peng Fan (OSS) wrote:

> From: Peng Fan <peng.fan@nxp.com>
> 
> 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 <peng.fan@nxp.com>
> ---
>  scripts/dtc/pylibfdt/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile
> index 493995e303..698790a1a0 100644
> --- a/scripts/dtc/pylibfdt/Makefile
> +++ b/scripts/dtc/pylibfdt/Makefile
> @@ -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.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-13 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13  9:39 [PATCH] scripts: pylibfdt: add a new include path Peng Fan (OSS)
2021-10-13 13:12 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.