diff options
author | Ross Burton <ross.burton@intel.com> | 2019-01-07 15:07:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-08 11:16:44 +0000 |
commit | 3085647e0cff533aa9d03b2184b8b4bf25ce9002 (patch) | |
tree | f3ad2038cb6b9512642c8d4d4b14b97418cef9f6 /meta/classes | |
parent | 48901a9f74f516576dd7154b6ff46d965c88986b (diff) | |
download | poky-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>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/toolchain-scripts.bbclass | 46 |
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. | ||
133 | for 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 | ||
140 | done | ||
141 | |||
142 | if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then | 131 | if [ -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" | ||
155 | fi | 155 | fi |
156 | EOF | 156 | EOF |
157 | } | 157 | } |