From fe678e75ea7048bdbcc60022aaf2bc4b332c7538 Mon Sep 17 00:00:00 2001 From: Randy Witt Date: Mon, 23 Feb 2015 17:00:39 +0000 Subject: 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. (From OE-Core rev: 62930ea37cfd5ba787ee85bc8dab23c20a775253) Signed-off-by: Randy Witt Signed-off-by: Richard Purdie --- meta/classes/toolchain-scripts.bbclass | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index 9836db4..ea6aff0 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 } -- cgit v1.1