From: Harish Sadineni <[email protected]>

Fixes [YOCTO #15061]

The generated SDK/tree environment scripts source *.sh fragments from
$OECORE_TARGET_SYSROOT/environment-setup.d. This target-sysroot handling
was added in 2d9466734f0c ("toolchain-scripts: Add mechanism to add
environment setup scripts") back in 2014, but nothing in oe-core (or the
other core layers) has ever installed a fragment into the target
sysroot's environment-setup.d. Every environment-setup.d producer
(openssl, rpm, git, curl, file, babeltrace2, python3-requests, cmake,
rust, cargo, rust-cross-canadian, ...) installs into the native sysroot
(SDKPATHNATIVE / native base_prefix), i.e. everything is nativesdk based.

The target-sysroot loop is therefore dead code that only adds confusion
about where environment fragments are expected to live. Remove it.

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

diff --git a/meta/classes-recipe/toolchain-scripts.bbclass 
b/meta/classes-recipe/toolchain-scripts.bbclass
index e971b9a270..8bfcde55b5 100644
--- a/meta/classes-recipe/toolchain-scripts.bbclass
+++ b/meta/classes-recipe/toolchain-scripts.bbclass
@@ -164,11 +164,6 @@ toolchain_shared_env_script () {
     cat >> $script <<EOF
 
 # Append environment subscripts
-if [ -d "\$OECORE_TARGET_SYSROOT/environment-setup.d" ]; then
-    for envfile in \$OECORE_TARGET_SYSROOT/environment-setup.d/*.sh; do
-           . \$envfile
-    done
-fi
 if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
     for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
            . \$envfile
-- 
2.51.0

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

Reply via email to