All of lore.kernel.org
 help / color / mirror / Atom feed
From: bruce.ashfield@gmail.com
To: richard.purdie@linuxfoundation.org
Cc: openembedded-core@lists.openembedded.org, TicoTimo@gmail.com,
	trevor.gamblin@windriver.com
Subject: [PATCH 02/20] kernel: export native PKGCONFIG variables
Date: Wed, 24 Nov 2021 16:14:08 -0500	[thread overview]
Message-ID: <21c084db7340d627741dba92fdefe3d27f99eef0.1637788184.git.bruce.ashfield@gmail.com> (raw)
In-Reply-To: <cover.1637788184.git.bruce.ashfield@gmail.com>

From: Bruce Ashfield <bruce.ashfield@gmail.com>

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>
---
 meta/classes/kernel.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)

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....
-- 
2.19.1



  parent reply	other threads:[~2021-11-24 21:14 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 21:14 [PATCH 00/20 v2] kernel: consolidated pull request bruce.ashfield
2021-11-24 21:14 ` [PATCH 01/20] linux-yocto-dev: bump to v5.16+ bruce.ashfield
2021-11-24 21:14 ` bruce.ashfield [this message]
2021-11-24 21:14 ` [PATCH 03/20] python: introduce python3-dtschema bruce.ashfield
2021-11-25 17:36   ` [OE-core] " Khem Raj
2021-11-25 17:51     ` Bruce Ashfield
2021-11-25 17:53       ` Khem Raj
2021-11-25 18:00         ` Bruce Ashfield
2021-11-24 21:14 ` [PATCH 04/20] python: import jsonpointer from meta-python bruce.ashfield
2021-11-24 21:14 ` [PATCH 05/20] python: import jsonschema " bruce.ashfield
2021-11-24 21:14 ` [PATCH 06/20] python: import idna " bruce.ashfield
2021-11-24 21:14 ` [PATCH 07/20] python: import rfc3339-validator " bruce.ashfield
2021-11-24 21:14 ` [PATCH 08/20] python: import rfc3986-validator " bruce.ashfield
2021-11-24 21:14 ` [PATCH 09/20] python: import webcolors " bruce.ashfield
2021-11-24 21:14 ` [PATCH 10/20] python: import ruamel-yaml " bruce.ashfield
2021-11-24 21:14 ` [PATCH 11/20] python: import pyrsistent " bruce.ashfield
2021-11-24 21:14 ` [PATCH 12/20] python: import rfc3987 from meta-pyton bruce.ashfield
2021-11-24 21:14 ` [PATCH 13/20] python: import strict-rfc3339 from meta-python bruce.ashfield
2021-11-24 21:14 ` [PATCH 14/20] python: import vcversioner " bruce.ashfield
2021-11-24 21:14 ` [PATCH 15/20] maintainers: update for kernel dtschema checking dependencies bruce.ashfield
2021-11-24 21:14 ` [PATCH 16/20] linux-yocto: export pkgconfig variables to devshell bruce.ashfield
2021-11-24 21:14 ` [PATCH 17/20] kernel: introduce python3-dtschema-wrapper bruce.ashfield
2021-11-24 21:14 ` [PATCH 18/20] linux-yocto-dev: introduce dt-validation PACKAGECONFIG bruce.ashfield
2021-11-24 21:14 ` [PATCH 19/20] perf: sort-pmuevents: don't drop elements bruce.ashfield
2021-11-24 21:14 ` [PATCH 20/20] perf: sort-pmuevents: allow for additional type qualifiers and storage class bruce.ashfield
2022-03-14 21:13   ` Ferry Toth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21c084db7340d627741dba92fdefe3d27f99eef0.1637788184.git.bruce.ashfield@gmail.com \
    --to=bruce.ashfield@gmail.com \
    --cc=TicoTimo@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=trevor.gamblin@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.