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>
This commit is contained in:
Otavio Salvador 2014-10-09 18:53:13 -03:00 committed by Richard Purdie
parent 505a6b696a
commit ee0ab903f8
1 changed files with 10 additions and 0 deletions

View File

@ -72,6 +72,16 @@ toolchain_shared_env_script () {
echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
echo 'export ARCH=${ARCH}' >> $script
echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
cat >> $script <<EOF
# Append environment subscripts
if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
source \$envfile
done
fi
EOF
}
#we get the cached site config in the runtime