summaryrefslogtreecommitdiffstats
path: root/meta/classes/toolchain-scripts.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-19 11:24:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-23 16:07:23 +0100
commit6cfed59323ce51909bbf2c8efbceb50e67835eb7 (patch)
tree34d4338bb8faddea497df2928bd7ef1a0985b242 /meta/classes/toolchain-scripts.bbclass
parentfed80c3d40d5811627eb7fac643316ea4de612ed (diff)
downloadpoky-6cfed59323ce51909bbf2c8efbceb50e67835eb7.tar.gz
toolchain-scrpts: Fix sitecache issues with multilib
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] (From OE-Core rev: 6d1dc943a9c8d97cd59d8cd98069d9bdb2615ff5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/toolchain-scripts.bbclass')
-rw-r--r--meta/classes/toolchain-scripts.bbclass13
1 files changed, 11 insertions, 2 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 9918e2ecda..b62bbf320d 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -98,7 +98,7 @@ EOF
98#we get the cached site config in the runtime 98#we get the cached site config in the runtime
99TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d, True)}" 99TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d, True)}"
100TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d" 100TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
101TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "${TCLIBC} ncurses" 101TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "virtual/libc ncurses"
102 102
103#This function create a site config file 103#This function create a site config file
104toolchain_create_sdk_siteconfig () { 104toolchain_create_sdk_siteconfig () {
@@ -113,6 +113,12 @@ toolchain_create_sdk_siteconfig () {
113 113
114 #get cached site config 114 #get cached site config
115 for sitefile in ${TOOLCHAIN_NEED_CONFIGSITE_CACHE}; do 115 for sitefile in ${TOOLCHAIN_NEED_CONFIGSITE_CACHE}; do
116 # Resolve virtual/* names to the real recipe name using sysroot-providers info
117 case $sitefile in virtual/*)
118 sitefile=`echo $sitefile | tr / _`
119 sitefile=`cat ${STAGING_DIR_TARGET}/sysroot-providers/$sitefile`
120 esac
121
116 if [ -r ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config ]; then 122 if [ -r ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config ]; then
117 cat ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config >> $siteconfig 123 cat ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config >> $siteconfig
118 fi 124 fi
@@ -134,10 +140,13 @@ toolchain_create_sdk_version () {
134toolchain_create_sdk_version[vardepsexclude] = "DATETIME" 140toolchain_create_sdk_version[vardepsexclude] = "DATETIME"
135 141
136python __anonymous () { 142python __anonymous () {
143 import oe.classextend
137 deps = "" 144 deps = ""
138 for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split(): 145 for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
139 deps += " %s:do_populate_sysroot" % dep 146 deps += " %s:do_populate_sysroot" % dep
140 for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split(): 147 for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split():
141 deps += " %s-%s:do_populate_sysroot" % (variant, dep) 148 clsextend = oe.classextend.ClassExtender(variant, d)
149 newdep = clsextend.extend_name(dep)
150 deps += " %s:do_populate_sysroot" % newdep
142 d.appendVarFlag('do_configure', 'depends', deps) 151 d.appendVarFlag('do_configure', 'depends', deps)
143} 152}