summaryrefslogtreecommitdiffstats
path: root/meta
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-02-06 16:38:30 +0000
commit83a235665b51e3fed58b4ecf7499ce975614368e (patch)
treec5f7ce001d7c9a02bc2053851aabb94a1c5e9b0a /meta
parent1433f5b865aa98fadaf26bd6d7519ffc468187bb (diff)
downloadpoky-83a235665b51e3fed58b4ecf7499ce975614368e.tar.gz
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) (From OE-Core rev: 2bb4774e6d873400e8a084e554a563925cf1c9b5) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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() {
128 touch $relocate_script 128 touch $relocate_script
129 129
130 cat >> $relocate_script <<EOF 130 cat >> $relocate_script <<EOF
131# Source top-level SDK env scripts in case they are needed for the relocate
132# scripts.
133for env_setup_script in ${env_dir}/environment-setup-*; do
134 . \$env_setup_script
135 status=\$?
136 if [ \$status != 0 ]; then
137 echo "\$0: Failed to source \$env_setup_script with status \$status"
138 exit \$status
139 fi
140done
141
142if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then 131if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
143 for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do 132 # Source top-level SDK env scripts in case they are needed for the relocate
144 if [ ! -x \$s ]; then 133 # scripts.
145 continue 134 for env_setup_script in ${env_dir}/environment-setup-*; do
146 fi 135 . \$env_setup_script
147 \$s "\$1" 136 status=\$?
148 status=\$? 137 if [ \$status != 0 ]; then
149 if [ \$status != 0 ]; then 138 echo "\$0: Failed to source \$env_setup_script with status \$status"
150 echo "post-relocate command \"\$s \$1\" failed with status \$status" >&2 139 exit \$status
151 exit \$status 140 fi
152 fi 141
153 done 142 for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do
154 rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d" 143 if [ ! -x \$s ]; then
144 continue
145 fi
146 \$s "\$1"
147 status=\$?
148 if [ \$status != 0 ]; then
149 echo "post-relocate command \"\$s \$1\" failed with status \$status" >&2
150 exit \$status
151 fi
152 done
153 done
154 rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
155fi 155fi
156EOF 156EOF
157} 157}