summaryrefslogtreecommitdiff
path: root/meta/classes/toolchain-scripts.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-06-22 18:44:06 -0500
committerSaul Wold <sgw@linux.intel.com>2012-07-03 00:05:30 -0700
commit42545ffbb37f2646a2a8c20999c21d3300e24f59 (patch)
tree2f3ecc3827a73ce627d048e4527e353174672855 /meta/classes/toolchain-scripts.bbclass
parent5fa9f980248e7813ce74f48a29c4b7d94e308cf9 (diff)
downloadopenembedded-core-42545ffbb37f2646a2a8c20999c21d3300e24f59.tar.gz
openembedded-core-42545ffbb37f2646a2a8c20999c21d3300e24f59.tar.bz2
openembedded-core-42545ffbb37f2646a2a8c20999c21d3300e24f59.zip
populate_sdk: enable basic multilib support
In order to enable basic multilib support for the export of an SDK image, a number of minor changes had to be made: The value of MULTIMACH_TARGET_SYS needs to be variable. This way we can define the value to the appropriate multilib. (Also in some cases the default PACKAGE_ARCH is set to MACHINE_ARCH which is incorrect for the SDK.) Add a companion REAL_MULTIMACH_TARGET_SYS, based on code from meta-environment, to allow for this. We have to convert the do_populate_sdk into a python call, and then break up the previous items into three parts. * Image construction * Setup of environment files * Generation of the tarball Then we can iterate over the multilibs to populate the environment files. Finally, matching changes were needed in the toolchain-scripts file. And what I presume is an optimization of immediate evaluation for TOOLCHAIN_CONFIGSITE_NOCACHE and ..._SYSROOTCACHE needed to be done at runtime, otherwise the wrong values may be used. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/classes/toolchain-scripts.bbclass')
-rw-r--r--meta/classes/toolchain-scripts.bbclass16
1 files changed, 10 insertions, 6 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 2099c4def8..bedcd612fe 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -1,15 +1,19 @@
inherit siteinfo
+# We want to be able to change the value of MULTIMACH_TARGET_SYS, because it
+# doesn't always match our expectations... but we default to the stock value
+REAL_MULTIMACH_TARGET_SYS ?= "${MULTIMACH_TARGET_SYS}"
+
# This function creates an environment-setup-script for use in a deployable SDK
toolchain_create_sdk_env_script () {
# Create environment setup script
- script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${MULTIMACH_TARGET_SYS}
+ script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}}
rm -f $script
touch $script
- echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${MULTIMACH_TARGET_SYS}:$PATH' >> $script
+ echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${REAL_MULTIMACH_TARGET_SYS}:$PATH' >> $script
echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script
echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script
- echo 'export CONFIG_SITE=${SDKPATH}/site-config-${MULTIMACH_TARGET_SYS}' >> $script
+ echo 'export CONFIG_SITE=${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}' >> $script
echo 'export CC=${TARGET_PREFIX}gcc' >> $script
echo 'export CXX=${TARGET_PREFIX}g++' >> $script
echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
@@ -36,7 +40,7 @@ toolchain_create_sdk_env_script () {
# This function creates an environment-setup-script in the TMPDIR which enables
# a OE-core IDE to integrate with the build tree
toolchain_create_tree_env_script () {
- script=${TMPDIR}/environment-setup-${MULTIMACH_TARGET_SYS}
+ script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
rm -f $script
touch $script
echo 'export PATH=${PATH}' >> $script
@@ -103,8 +107,8 @@ toolchain_create_sdk_env_script_for_installer () {
}
#we get the cached site config in the runtime
-TOOLCHAIN_CONFIGSITE_NOCACHE := "${@siteinfo_get_files(d, True)}"
-TOOLCHAIN_CONFIGSITE_SYSROOTCACHE := "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d"
+TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d, True)}"
+TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d"
TOOLCHAIN_NEED_CONFIGSITE_CACHE = "${TCLIBC} ncurses"
#This function create a site config file