summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-01-07 15:07:38 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-07 17:45:38 +0000
commitc4897001cb3eeda1f4f11197b28c09c950bdcf02 (patch)
tree3dce237f8dee336427ccdfefc9944e8dc51895a0
parent008ce2534414b505d40128f0a722f44bcf4a4034 (diff)
downloadopenembedded-core-contrib-c4897001cb3eeda1f4f11197b28c09c950bdcf02.tar.gz
openembedded-core-contrib-c4897001cb3eeda1f4f11197b28c09c950bdcf02.tar.bz2
openembedded-core-contrib-c4897001cb3eeda1f4f11197b28c09c950bdcf02.zip
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. Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/classes/toolchain-scripts.bbclass46
1 files changed, 23 insertions, 23 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 6d1ba69473..1a2ec4f3b2 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -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
}