summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJun Zhang <jun.zhang@windriver.com>2016-02-19 16:00:43 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-21 09:31:59 +0000
commit1116572916443109176c0df32efc275eceeb706a (patch)
tree39fbf9fbdaeaab6a8402b1586ca0e66dc939e106
parent1602e8edf998ad2cd7dc06c5d55f4aad1ff24af1 (diff)
downloadopenembedded-core-contrib-1116572916443109176c0df32efc275eceeb706a.tar.gz
openembedded-core-contrib-1116572916443109176c0df32efc275eceeb706a.tar.bz2
openembedded-core-contrib-1116572916443109176c0df32efc275eceeb706a.zip
toolchain-scripts.bbclass: add three other path to PATH in env.sh
in sdk,there are some utils in sysroot/host-os/bin, sysroot/host-os/sbin/,sysroot/host-os/usr/bin need to use, so add these three paths to PATH in env.sh. Signed-off-by: Jun Zhang <jun.zhang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/toolchain-scripts.bbclass5
-rw-r--r--meta/conf/bitbake.conf3
2 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 1566dd64d9..2e2c93af41 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -9,6 +9,9 @@ TARGET_CC_ARCH_append_libc-musl = " -mmusl"
# This function creates an environment-setup-script for use in a deployable SDK
toolchain_create_sdk_env_script () {
# Create environment setup script
+ base_sbindir=${10:-${base_sbindir_nativesdk}}
+ base_bindir=${9:-${base_bindir_nativesdk}}
+ sbindir=${8:-${sbindir_nativesdk}}
sdkpathnative=${7:-${SDKPATHNATIVE}}
prefix=${6:-${prefix_nativesdk}}
bindir=${5:-${bindir_nativesdk}}
@@ -23,7 +26,7 @@ toolchain_create_sdk_env_script () {
for i in ${CANADIANEXTRAOS}; do
EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i"
done
- echo "export PATH=$sdkpathnative$bindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH' >> $script
+ echo "export PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH' >> $script
echo "export CCACHE_PATH=$sdkpathnative$bindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$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
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 631b759349..4ea0fe56fa 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -62,6 +62,9 @@ bindir_cross = "/bin"
bindir_crossscripts = "${bindir}/crossscripts"
prefix_nativesdk = "/usr"
bindir_nativesdk = "${prefix_nativesdk}/bin"
+sbindir_nativesdk = "${prefix_nativesdk}/sbin"
+base_bindir_nativesdk = "/bin"
+base_sbindir_nativesdk = "/sbin"
includedir_nativesdk = "${prefix_nativesdk}/include"
libdir_nativesdk = "${prefix_nativesdk}/lib"
base_libdir_nativesdk = "/lib"