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 17:01:08 +0000 |
commit | ace63e94e346637b116a0365b89fbfd2ff1a393b (patch) | |
tree | e213b9c34795ba3ea1c202bd5dbea3ab7f33a82e /meta/classes | |
parent | 4f3a8ee65b540bdb3387bb9fb151da11972ba762 (diff) | |
download | poky-ace63e94e346637b116a0365b89fbfd2ff1a393b.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+
(From OE-Core rev: 9172d61c57e23682c3d2c25701cbd53c84d01a27)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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" | |||
326 | 326 | ||
327 | kernel_do_compile() { | 327 | kernel_do_compile() { |
328 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE | 328 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE |
329 | |||
330 | # setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native) | ||
331 | export PKG_CONFIG_DIR="${STAGING_DIR_NATIVE}${libdir_native}/pkgconfig" | ||
332 | export PKG_CONFIG_PATH="$PKG_CONFIG_DIR:${STAGING_DATADIR_NATIVE}/pkgconfig" | ||
333 | export PKG_CONFIG_LIBDIR="$PKG_CONFIG_DIR" | ||
334 | export PKG_CONFIG_SYSROOT_DIR="" | ||
335 | |||
329 | if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then | 336 | if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then |
330 | # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not | 337 | # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not |
331 | # be set.... | 338 | # be set.... |