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-08 11:16:44 +0000
commit3085647e0cff533aa9d03b2184b8b4bf25ce9002 (patch)
treef3ad2038cb6b9512642c8d4d4b14b97418cef9f6
parent48901a9f74f516576dd7154b6ff46d965c88986b (diff)
downloadpoky-3085647e0cff533aa9d03b2184b8b4bf25ce9002.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) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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}