mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 18:32:12 +02:00
toolchain-scripts: run post-relocate scripts for every environment
SDKs for multilib configurations have multiple environment scripts, so re-arrange the post-relocate hook invocation so that it runs the post-relocate hooks after sourcing each environment script. (From OE-Core rev: c4897001cb3eeda1f4f11197b28c09c950bdcf02) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
48901a9f74
commit
3085647e0c
@@ -128,30 +128,30 @@ toolchain_create_post_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
|
||||
|
||||
if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
|
||||
for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do
|
||||
if [ ! -x \$s ]; then
|
||||
continue
|
||||
fi
|
||||
\$s "\$1"
|
||||
status=\$?
|
||||
if [ \$status != 0 ]; then
|
||||
echo "post-relocate command \"\$s \$1\" failed with status \$status" >&2
|
||||
exit \$status
|
||||
fi
|
||||
done
|
||||
rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
|
||||
# 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
|
||||
|
||||
for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do
|
||||
if [ ! -x \$s ]; then
|
||||
continue
|
||||
fi
|
||||
\$s "\$1"
|
||||
status=\$?
|
||||
if [ \$status != 0 ]; then
|
||||
echo "post-relocate command \"\$s \$1\" failed with status \$status" >&2
|
||||
exit \$status
|
||||
fi
|
||||
done
|
||||
done
|
||||
rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
|
||||
fi
|
||||
EOF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user