public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: sjg@chromium.org, u-boot@lists.denx.de, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH] scripts: pylibfdt: add a new include path
Date: Wed, 13 Oct 2021 09:12:10 -0400	[thread overview]
Message-ID: <20211013131210.GL7964@bill-the-cat> (raw)
In-Reply-To: <20211013093952.16466-1-peng.fan@oss.nxp.com>

[-- 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 --]

      reply	other threads:[~2021-10-13 13:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13  9:39 [PATCH] scripts: pylibfdt: add a new include path Peng Fan (OSS)
2021-10-13 13:12 ` Tom Rini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211013131210.GL7964@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox