[oe-commits] [openembedded-core] 35/57: toolchain-scripts: preserve host path in environment setup script

git at git.openembedded.org git at git.openembedded.org
Thu May 3 09:05:49 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit c8287104504da5cdf6591a537634acba06b9e1b9
Author: Chin Huat Ang <chin.huat.ang at intel.com>
AuthorDate: Wed Apr 25 16:00:13 2018 +0800

    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]
    
    Signed-off-by: Chin Huat Ang <chin.huat.ang at intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/toolchain-scripts.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index eeb320d..ee411dd 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -62,7 +62,8 @@ toolchain_create_tree_env_script () {
 	script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
 	rm -f $script
 	touch $script
-	echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${PATH}' >> $script
+	echo ". ${COREBASE}/oe-init-build-env ${TOPDIR}" >> $script
+	echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${STAGING_BINDIR_TOOLCHAIN}:$PATH' >> $script
 	echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script
 	echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script
 	echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list