diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-06-22 18:44:06 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-03 14:54:58 +0100 |
commit | 01e891ad718803e851e46a06539355a18fbade98 (patch) | |
tree | f60baeda4d8383cadfd455771e1762ba3a8acbd7 /meta/classes/toolchain-scripts.bbclass | |
parent | 66d3d3b2289f45f07b3ce407f2c299ca36dc6788 (diff) | |
download | poky-01e891ad718803e851e46a06539355a18fbade98.tar.gz |
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.
(From OE-Core rev: 42545ffbb37f2646a2a8c20999c21d3300e24f59)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/toolchain-scripts.bbclass')
-rw-r--r-- | meta/classes/toolchain-scripts.bbclass | 16 |
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 @@ | |||
1 | inherit siteinfo | 1 | inherit siteinfo |
2 | 2 | ||
3 | # We want to be able to change the value of MULTIMACH_TARGET_SYS, because it | ||
4 | # doesn't always match our expectations... but we default to the stock value | ||
5 | REAL_MULTIMACH_TARGET_SYS ?= "${MULTIMACH_TARGET_SYS}" | ||
6 | |||
3 | # This function creates an environment-setup-script for use in a deployable SDK | 7 | # This function creates an environment-setup-script for use in a deployable SDK |
4 | toolchain_create_sdk_env_script () { | 8 | toolchain_create_sdk_env_script () { |
5 | # Create environment setup script | 9 | # Create environment setup script |
6 | script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${MULTIMACH_TARGET_SYS} | 10 | script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}} |
7 | rm -f $script | 11 | rm -f $script |
8 | touch $script | 12 | touch $script |
9 | echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${MULTIMACH_TARGET_SYS}:$PATH' >> $script | 13 | echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${REAL_MULTIMACH_TARGET_SYS}:$PATH' >> $script |
10 | echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script | 14 | echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script |
11 | echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script | 15 | echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script |
12 | echo 'export CONFIG_SITE=${SDKPATH}/site-config-${MULTIMACH_TARGET_SYS}' >> $script | 16 | echo 'export CONFIG_SITE=${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}' >> $script |
13 | echo 'export CC=${TARGET_PREFIX}gcc' >> $script | 17 | echo 'export CC=${TARGET_PREFIX}gcc' >> $script |
14 | echo 'export CXX=${TARGET_PREFIX}g++' >> $script | 18 | echo 'export CXX=${TARGET_PREFIX}g++' >> $script |
15 | echo 'export GDB=${TARGET_PREFIX}gdb' >> $script | 19 | echo 'export GDB=${TARGET_PREFIX}gdb' >> $script |
@@ -36,7 +40,7 @@ toolchain_create_sdk_env_script () { | |||
36 | # This function creates an environment-setup-script in the TMPDIR which enables | 40 | # This function creates an environment-setup-script in the TMPDIR which enables |
37 | # a OE-core IDE to integrate with the build tree | 41 | # a OE-core IDE to integrate with the build tree |
38 | toolchain_create_tree_env_script () { | 42 | toolchain_create_tree_env_script () { |
39 | script=${TMPDIR}/environment-setup-${MULTIMACH_TARGET_SYS} | 43 | script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} |
40 | rm -f $script | 44 | rm -f $script |
41 | touch $script | 45 | touch $script |
42 | echo 'export PATH=${PATH}' >> $script | 46 | echo 'export PATH=${PATH}' >> $script |
@@ -103,8 +107,8 @@ toolchain_create_sdk_env_script_for_installer () { | |||
103 | } | 107 | } |
104 | 108 | ||
105 | #we get the cached site config in the runtime | 109 | #we get the cached site config in the runtime |
106 | TOOLCHAIN_CONFIGSITE_NOCACHE := "${@siteinfo_get_files(d, True)}" | 110 | TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d, True)}" |
107 | TOOLCHAIN_CONFIGSITE_SYSROOTCACHE := "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d" | 111 | TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d" |
108 | TOOLCHAIN_NEED_CONFIGSITE_CACHE = "${TCLIBC} ncurses" | 112 | TOOLCHAIN_NEED_CONFIGSITE_CACHE = "${TCLIBC} ncurses" |
109 | 113 | ||
110 | #This function create a site config file | 114 | #This function create a site config file |