summaryrefslogtreecommitdiffstats
path: root/meta/classes/toolchain-scripts.bbclass
diff options
context:
space:
mode:
authorChin Huat Ang <chin.huat.ang@intel.com>2018-04-25 16:00:13 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-04 13:35:02 +0100
commitd7d6ef7df7e14872dd98883ba3a75c28a1c69947 (patch)
treedcec9f38053c2a4bc7979a786301ee2c74a38b72 /meta/classes/toolchain-scripts.bbclass
parentda3625c52e1ab8985fba4fc3d133edf92142f182 (diff)
downloadpoky-d7d6ef7df7e14872dd98883ba3a75c28a1c69947.tar.gz
toolchain-scripts: preserve host path in environment setup script
The environment setup script generated in the build directory sets the PATH variable by expanding ${PATH} which would have host paths filtered. Sourcing this script to run runqemu will not work as it complains host stty (/bin/stty) cannot be found. To resolve this, the script no longer expands ${PATH} during generation time, instead it will now source oe-init-build-env to initialize the build environment so that all host paths will be preserved. Also be sure to prepend STAGING_BINDIR_TOOLCHAIN to the PATH variable so that the toolchain from the build directory can be found. [YOCTO #12695] (From OE-Core rev: a64a144096c0637387244b89ed22f4b5352b2522) Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.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.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index eeb320d15a..ee411ddca0 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -62,7 +62,8 @@ toolchain_create_tree_env_script () {
62 script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} 62 script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
63 rm -f $script 63 rm -f $script
64 touch $script 64 touch $script
65 echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${PATH}' >> $script 65 echo ". ${COREBASE}/oe-init-build-env ${TOPDIR}" >> $script
66 echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${STAGING_BINDIR_TOOLCHAIN}:$PATH' >> $script
66 echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script 67 echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script
67 echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script 68 echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script
68 echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script 69 echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script