Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] toolchain-scrpts: Fix sitecache issues with multilib
Date: Fri, 19 Jun 2015 11:24:39 +0100	[thread overview]
Message-ID: <1434709479.14710.113.camel@linuxfoundation.org> (raw)

The use of TCLIBC in TOOLCHAIN_NEED_CONFIGSITE_CACHE is problematic
since a multilib may have both uclibc and glibc for different multilibs
yet switching between them doesn't change TCLIBC. This would result
in "lib32-glibc" being attempted when lib32 was actually uclibc.

The fix here is to use the virtual providers which bitbake switches
to point correctly at the right things.

This does mean we need to resolve virtual providers but we can do this using
sysroot-providers.

[YCOTO #7607]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 59a122f..16db511 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -98,7 +98,7 @@ EOF
 #we get the cached site config in the runtime
 TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d, True)}"
 TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
-TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "${TCLIBC} ncurses"
+TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "virtual/libc ncurses"
 
 #This function create a site config file
 toolchain_create_sdk_siteconfig () {
@@ -113,6 +113,12 @@ toolchain_create_sdk_siteconfig () {
 
 	#get cached site config
 	for sitefile in ${TOOLCHAIN_NEED_CONFIGSITE_CACHE}; do
+		# Resolve virtual/* names to the real recipe name using sysroot-providers info
+		case $sitefile in virtual/*)
+			sitefile=`echo $sitefile | tr / _`
+			sitefile=`cat ${STAGING_DIR_TARGET}/sysroot-providers/$sitefile`
+		esac
+
 		if [ -r ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config ]; then
 			cat ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config >> $siteconfig
 		fi




                 reply	other threads:[~2015-06-19 10:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1434709479.14710.113.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox