From: Harish Sadineni <[email protected]>

Fixes [YOCTO #15061]

Source any *.sh files from environment-setup.d/${TARGET_ARCH} in
addition to the existing environment-setup.d directory in the generated
SDK and tree environment setup scripts.

This complements the rust-cross-canadian changes, where Rust
environment setup scripts are installed under a target-specific
directory. By sourcing only the scripts that match the active target,
the SDK avoids loading environment settings for other target variants,
such as mixing 32-bit and 64-bit configurations in multilib SDKs.

Signed-off-by: Harish Sadineni <[email protected]>
---
 meta/classes-recipe/toolchain-scripts.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes-recipe/toolchain-scripts.bbclass 
b/meta/classes-recipe/toolchain-scripts.bbclass
index 8bfcde55b5..7b10b76609 100644
--- a/meta/classes-recipe/toolchain-scripts.bbclass
+++ b/meta/classes-recipe/toolchain-scripts.bbclass
@@ -169,6 +169,11 @@ if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; 
then
            . \$envfile
     done
 fi
+if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d/\$OECORE_TARGET_ARCH" ]; 
then
+    for envfile in 
\$OECORE_NATIVE_SYSROOT/environment-setup.d/\$OECORE_TARGET_ARCH/*.sh; do
+            . \$envfile
+    done
+fi
 EOF
 }
 
-- 
2.51.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#246965): 
https://lists.openembedded.org/g/openembedded-core/message/246965
Mute This Topic: https://lists.openembedded.org/mt/121507367/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to