summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2014-10-09 18:53:13 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-10 16:44:31 +0100
commitee0ab903f8195d9ce43187a97ede1261b02eb691 (patch)
treeb8c4edb0e61712b1d5927427930ee1828f360346 /meta
parent505a6b696ae990442de720e5e1135a3e44d5f75c (diff)
downloadpoky-ee0ab903f8195d9ce43187a97ede1261b02eb691.tar.gz
toolchain-scripts.bbclass: Allow sourcing of subscript for environment
Sometimes we require extra environment settings to be available on the environment for proper SDK work. This were done, in past, using '_append' tasks however with the split of the environment in a canadian package this has been broken. The easier and more flexible solution is to use environment subscripts which are sources by the main script. These are now looked at: $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh and sourced. (From OE-Core rev: 457291f2ca084d1f43c0cca2175b448a22761887) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/toolchain-scripts.bbclass10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 6cc8eba900..11ffbe5be0 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -72,6 +72,16 @@ toolchain_shared_env_script () {
72 echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script 72 echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
73 echo 'export ARCH=${ARCH}' >> $script 73 echo 'export ARCH=${ARCH}' >> $script
74 echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script 74 echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
75
76 cat >> $script <<EOF
77
78# Append environment subscripts
79if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
80 for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
81 source \$envfile
82 done
83fi
84EOF
75} 85}
76 86
77#we get the cached site config in the runtime 87#we get the cached site config in the runtime