[1/7] toolchain-scripts: run post-relocate scripts for every environment

Message ID 20190107163823.31816-1-ross.burton@intel.com
State New
Headers show
Series
  • [1/7] toolchain-scripts: run post-relocate scripts for every environment
Related show

Commit Message

Ross Burton Jan. 7, 2019, 4:38 p.m.
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>

---
 meta/classes/toolchain-scripts.bbclass | 46 +++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 23 deletions(-)

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Ross Burton Jan. 8, 2019, 11:01 a.m. | #1
On Mon, 7 Jan 2019 at 16:38, Ross Burton <ross.burton@intel.com> wrote:
> 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.


I think this change - whilst the right thing - exposes a problem that
icecc doesn't work properly in multilib SDKs.  Can I ask you to
investigate and sort this, as you submitted the icecc rewrite
recently?

Ross
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Joshua Watt Jan. 8, 2019, 1:10 p.m. | #2
On Tue, Jan 8, 2019, 5:02 AM Burton, Ross <ross.burton@intel.com wrote:

> On Mon, 7 Jan 2019 at 16:38, Ross Burton <ross.burton@intel.com> wrote:

> > 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.

>

> I think this change - whilst the right thing - exposes a problem that

> icecc doesn't work properly in multilib SDKs.  Can I ask you to

> investigate and sort this, as you submitted the icecc rewrite

> recently?

>


Yep, I'll take a look.


> Ross

>
<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 8, 2019, 5:02 AM Burton, Ross &lt;<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 7 Jan 2019 at 16:38, Ross Burton &lt;<a href="mailto:ross.burton@intel.com" target="_blank" rel="noreferrer">ross.burton@intel.com</a>&gt; wrote:<br>
&gt; SDKs for multilib configurations have multiple environment scripts, so<br>
&gt; re-arrange the post-relocate hook invocation so that it runs the post-relocate<br>
&gt; hooks after sourcing each environment script.<br>
<br>
I think this change - whilst the right thing - exposes a problem that<br>
icecc doesn&#39;t work properly in multilib SDKs.  Can I ask you to<br>
investigate and sort this, as you submitted the icecc rewrite<br>
recently?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Yep, I&#39;ll take a look.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Ross<br>
</blockquote></div></div></div>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Ross Burton Jan. 8, 2019, 1:19 p.m. | #3
On Tue, 8 Jan 2019 at 13:10, Joshua Watt <jpewhacker@gmail.com> wrote:
>> I think this change - whilst the right thing - exposes a problem that

>> icecc doesn't work properly in multilib SDKs.  Can I ask you to

>> investigate and sort this, as you submitted the icecc rewrite

>> recently?

>

> Yep, I'll take a look.


Thanks, hopefully you spotted some bug mail earlier.

Ross
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 6d1ba69473a..1a2ec4f3b29 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
 }