summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2021-11-22 23:15:16 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-26 17:01:08 +0000
commit13527d2409a63e538475858a24a0e5f26ed491f0 (patch)
tree9ddc170f6efcb298179cf82e31ddb5a00a31d804
parent1ba9c9690f6672e9380904b6d1088e346724bf42 (diff)
downloadpoky-13527d2409a63e538475858a24a0e5f26ed491f0.tar.gz
linux-yocto: export pkgconfig variables to devshell
Not all of the kernel host/build Makefiles allow pkg-config to be overriden to pkg-config-native. Exporting these variables allow us to debug host tool issues with the kernel build. (From OE-Core rev: ea71e50be2de5b7fc81f466ea5cd48c2f1e0ef6b) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 15fc7ff724..a3b2416367 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -61,3 +61,12 @@ KERNEL_FEATURES:append:qemuall=" features/kernel-sample/kernel-sample.scc"
61 61
62KERNEL_DEBUG_OPTIONS ?= "stack" 62KERNEL_DEBUG_OPTIONS ?= "stack"
63KERNEL_EXTRA_ARGS:append:x86-64 = "${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ -lelf"', '', d)}" 63KERNEL_EXTRA_ARGS:append:x86-64 = "${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ -lelf"', '', d)}"
64
65do_devshell:prepend() {
66 # setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native)
67 d.setVar("PKG_CONFIG_DIR", "${STAGING_DIR_NATIVE}${libdir_native}/pkgconfig")
68 d.setVar("PKG_CONFIG_PATH", "${PKG_CONFIG_DIR}:${STAGING_DATADIR_NATIVE}/pkgconfig")
69 d.setVar("PKG_CONFIG_LIBDIR", "${PKG_CONFIG_DIR}")
70 d.setVarFlag("PKG_CONFIG_SYSROOT_DIR", "unexport", "1")
71 d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR")
72}