diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-11-22 23:22:55 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-26 16:58:29 +0000 |
commit | 9172d61c57e23682c3d2c25701cbd53c84d01a27 (patch) | |
tree | 3832e93bedab30ea4f81256af4169badd5b6f231 /meta/classes/kernel.bbclass | |
parent | 37fb1592eb8bcc4a8bbfc3f4b1dc6373733827f0 (diff) | |
download | openembedded-core-contrib-9172d61c57e23682c3d2c25701cbd53c84d01a27.tar.gz |
kernel: export native PKGCONFIG variables
In a similar manner to cml1.bbclass, we export the pkg-config
variables to allow a direct call to pkg-config access to the
native sysroot versus the target sysroot.
The kernel doesn't use pkg-config for target configuration,
and has many explicit calls to pkg-config, without the
possibility of easy override to pkg-config-native.
The calls to pkg-config could be made cross friendly via
replacement with make variables, but until that effort is
undertaken upstream, we need a bridge approach.
In particular, this is required for dtschema validation,
which is a requirement in kernel 5.16+
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r-- | meta/classes/kernel.bbclass | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index e0b752de19..2d219cb5e5 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -326,6 +326,13 @@ KERNEL_DEBUG_TIMESTAMPS ??= "0" kernel_do_compile() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + + # setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native) + export PKG_CONFIG_DIR="${STAGING_DIR_NATIVE}${libdir_native}/pkgconfig" + export PKG_CONFIG_PATH="$PKG_CONFIG_DIR:${STAGING_DATADIR_NATIVE}/pkgconfig" + export PKG_CONFIG_LIBDIR="$PKG_CONFIG_DIR" + export PKG_CONFIG_SYSROOT_DIR="" + if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not # be set.... |