dtc: Use pkg-config to locate libyaml
authorPavel Modilaynen <pavel.modilaynen@axis.com>
Fri, 12 Jul 2019 11:52:19 +0000 (13:52 +0200)
committerRob Herring <robh@kernel.org>
Mon, 4 Nov 2019 17:21:07 +0000 (11:21 -0600)
commit067c650c456e758f933aaf87a202f841d34be269
tree276b47912c6e78fe14df3b50a2267260b6b9f8be
parent1ee1ffe1f0fb77fd3e86cb23acb0f81976e5dc3c
dtc: Use pkg-config to locate libyaml

Using Makefile's wildcard with absolute path to detect
the presence of libyaml results in false-positive
detection when cross-compiling e.g. in yocto environment.
The latter results in build error:
| scripts/dtc/yamltree.o: In function `yaml_propval_int':
| yamltree.c: undefined reference to `yaml_sequence_start_event_initialize'
| yamltree.c: undefined reference to `yaml_emitter_emit'
| yamltree.c: undefined reference to `yaml_scalar_event_initialize'
...
Use pkg-config to locate libyaml to address this scenario.

Signed-off-by: Pavel Modilaynen <pavel.modilaynen@axis.com>
[robh: silence stderr]
Signed-off-by: Rob Herring <robh@kernel.org>
scripts/dtc/Makefile