diff options
author | Randy Witt <randy.e.witt@linux.intel.com> | 2015-02-23 17:00:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-23 18:00:11 +0000 |
commit | 62930ea37cfd5ba787ee85bc8dab23c20a775253 (patch) | |
tree | 4d4cbc53f039c282e2014b2a0ef7309c804b13ce | |
parent | f704b0ad26bbca868c4ac40addb92dcd212f586f (diff) | |
download | openembedded-core-62930ea37cfd5ba787ee85bc8dab23c20a775253.tar.gz openembedded-core-62930ea37cfd5ba787ee85bc8dab23c20a775253.tar.bz2 openembedded-core-62930ea37cfd5ba787ee85bc8dab23c20a775253.zip |
toolchain-scripts: Add parameters to toolchain_create_sdk_env_script.
To add some flexibility to setting up the paths for the toolchain,
add some parameters. This initial use will be in order to point at
the buildsystem toolchain copied in by copy_buildsystem.py.
Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/toolchain-scripts.bbclass | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index 9836db4a4c..ea6aff0780 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -7,6 +7,9 @@ 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 + sdkpathnative=${7:-${SDKPATHNATIVE}} + prefix=${6:-${prefix_nativesdk}} + bindir=${5:-${bindir_nativesdk}} libdir=${4:-${libdir}} sysroot=${3:-${SDKTARGETSYSROOT}} multimach_target_sys=${2:-${REAL_MULTIMACH_TARGET_SYS}} @@ -16,17 +19,17 @@ toolchain_create_sdk_env_script () { echo 'export SDKTARGETSYSROOT='"$sysroot" >> $script EXTRAPATH="" for i in ${CANADIANEXTRAOS}; do - EXTRAPATH="$EXTRAPATH:${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_ARCH}${TARGET_VENDOR}-$i" + EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i" done - echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS}'$EXTRAPATH':$PATH' >> $script - echo 'export CCACHE_PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS}'$EXTRAPATH':$CCACHE_PATH' >> $script + echo "export PATH=$sdkpathnative$bindir:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH' >> $script + echo 'export CCACHE_PATH=$sdkpathnative$bindir:$sdkpathnative$bindir/${TARGET_SYS}'$EXTRAPATH':$CCACHE_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 OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script + echo "export OECORE_NATIVE_SYSROOT=\"$sdkpathnative\"" >> $script echo 'export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"' >> $script - echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script - echo 'export PYTHONHOME=${SDKPATHNATIVE}${prefix_nativesdk}' >> $script + echo "export OECORE_ACLOCAL_OPTS=\"-I $sdkpathnative/usr/share/aclocal\"" >> $script + echo "export PYTHONHOME=$sdkpathnative$prefix" >> $script toolchain_shared_env_script } |