WSL2-Linux-Kernel/scripts/dtc
Masahiro Yamada f8d8b46cd2 scripts/dtc: use pkg-config to include <yaml.h> in non-standard path
Commit 067c650c45 ("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>
Signed-off-by: Rob Herring <robh@kernel.org>
2020-06-08 13:14:00 -06:00
..
include-prefixes
libfdt scripts/dtc: Update to upstream version v1.6.0-2-g87a656ae5ff9 2020-03-13 08:56:58 -05:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile scripts/dtc: use pkg-config to include <yaml.h> in non-standard path 2020-06-08 13:14:00 -06:00
checks.c scripts/dtc: Update to upstream version v1.6.0-2-g87a656ae5ff9 2020-03-13 08:56:58 -05:00
data.c
dt_to_config
dtc-lexer.l scripts/dtc: Remove redundant YYLOC global declaration 2020-03-27 08:31:13 -06:00
dtc-parser.y scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a 2019-12-26 15:39:13 -07:00
dtc.c
dtc.h
dtx_diff
fdtdump.c
fdtget.c
fdtput.c
flattree.c
fstree.c scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a 2019-12-26 15:39:13 -07:00
livetree.c scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a 2019-12-26 15:39:13 -07:00
srcpos.c
srcpos.h
treesource.c
update-dtc-source.sh scripts/dtc: Remove unused makefile fragments 2020-03-13 08:55:53 -05:00
util.c scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a 2019-12-26 15:39:13 -07:00
util.h scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a 2019-12-26 15:39:13 -07:00
version_gen.h scripts/dtc: Update to upstream version v1.6.0-2-g87a656ae5ff9 2020-03-13 08:56:58 -05:00
yamltree.c scripts/dtc: Revert "yamltree: Ensure consistent bracketing of properties with phandles" 2020-01-28 10:21:47 -06:00