From: Rob Herring <robh@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Frank Rowand <frowand.list@gmail.com>
Subject: Re: [PATCH] scripts/dtc: use pkg-config to include <yaml.h> in non-standard path
Date: Mon, 8 Jun 2020 13:15:45 -0600 [thread overview]
Message-ID: <20200608191545.GA3346390@bogus> (raw)
In-Reply-To: <20200505100319.741454-1-masahiroy@kernel.org>
On Tue, May 05, 2020 at 07:03:19PM +0900, Masahiro Yamada wrote:
> Commit 067c650c456e ("dtc: Use pkg-config to locate libyaml") added
> 'pkg-config --libs' to link libyaml installed in a non-standard
> location.
>
> yamltree.c includes <yaml.h>, but that commit did not add the search
> path for <yaml.h>. If /usr/include/yaml.h does not exist, it fails to
> build. A user can explicitly pass HOSTCFLAGS to work around it, but
> the policy is not consistent.
>
> There are two ways to deal with libraries in a non-default location.
>
> [1] Use HOSTCFLAGS and HOSTLDFLAGS for additional search paths for
> headers and libraries.
> They are documented in Documentation/kbuild/kbuild.rst
>
> $ make HOSTCFLAGS='-I <prefix>/include' HOSTLDFLAGS='-L <prefix>/lib'
>
> [2] Use pkg-config
>
> 'pkg-config --cflags' for querying the header search path
> 'pkg-config --libs' for querying the lib and its path
>
> If we go with pkg-config, use [2] consistently. Do not mix up
> [1] and [2].
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> scripts/dtc/Makefile | 3 +++
> 1 file changed, 3 insertions(+)
Sorry, missed this one. Now applied for 5.8.
Rob
prev parent reply other threads:[~2020-06-08 19:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 10:03 [PATCH] scripts/dtc: use pkg-config to include <yaml.h> in non-standard path Masahiro Yamada
2020-06-08 19:15 ` Rob Herring [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=20200608191545.GA3346390@bogus \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
/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