1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

toolchain-scripts: pass env to post-relocate

It's useful for the post-relocate scripts to be able to see the SDK
environment, for example to see the values of CC, CXX etc. in order to
dynamically generate toolchain files.

To enable this, source the SDK environment script prior to calling the
relocate scripts.

(From OE-Core rev: adcf69ee3310171580c28e141fec6997b1f06da4)

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Martin Kelly
2018-06-04 16:06:00 -07:00
committed by Richard Purdie
parent 27f593ebd2
commit aa497e057b
2 changed files with 17 additions and 5 deletions
+16 -4
View File
@@ -118,11 +118,23 @@ EOF
}
toolchain_create_post_relocate_script() {
script=$1
rm -f $script
touch $script
relocate_script=$1
env_dir=$2
rm -f $relocate_script
touch $relocate_script
cat >> $relocate_script <<EOF
# Source top-level SDK env scripts in case they are needed for the relocate
# scripts.
for env_setup_script in ${env_dir}/environment-setup-*; do
. \$env_setup_script
status=\$?
if [ \$status != 0 ]; then
echo "\$0: Failed to source \$env_setup_script with status \$status"
exit \$status
fi
done
cat >> $script <<EOF
if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do
if [ ! -x \$s ]; then