From: Harish Sadineni <Harish.Sadineni@windriver.com>
To: Ross Burton <Ross.Burton@arm.com>
Cc: "openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>,
"Sundeep.Kokkonda@windriver.com" <Sundeep.Kokkonda@windriver.com>,
"MacLeod, Randy" <randy.macleod@windriver.com>
Subject: Re: [OE-core] [PATCH v2 2/5] toolchain-scripts.bbclass: Support target-specific environment setup scripts
Date: Tue, 23 Sep 2025 17:44:56 +0530 [thread overview]
Message-ID: <d12886ad-409d-469e-b037-0590818d52c8@windriver.com> (raw)
In-Reply-To: <515EC6BC-D6C8-4B16-B99B-A3DF3FAB66A3@arm.com>
On 9/18/2025 9:29 PM, Ross Burton wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On 15 Sep 2025, at 11:27, Sadineni, Harish via lists.openembedded.org <Harish.Sadineni=windriver.com@lists.openembedded.org> wrote:
>> From: Harish Sadineni <Harish.Sadineni@windriver.com>
>>
>> YOCTO [#15061]
>> Extending the SDK environment setup logic to also source scripts from a
>> target-specific directory `${TARGET_SYS}_environment-setup.d`, if it exists.
>> +if [ -d "\$OECORE_NATIVE_SYSROOT/${TARGET_SYS}_environment-setup.d" ]; then
> We already have a target-specific directory already: populated by the target recipes.
>
> The SDKs are constructed in two parts:
>
> - The target recipes (eg libxml2) are used to build the target sysroot. In this case, the same package that provides /usr/lib/libxml2.so <http://libxml2.so/> on the target will be used in the target sysroot to link against.
>
> - The nativesdk recipes (eg nativesdk-libxml2) are used to build the native sysroot (thus the name, native for the SDK). So in this case, nativesdk-libxml2 will provide the xmllint binary in the SDK.
>
> There should be _no_ connection between the target MACHINE and the nativesdk recipes, just like there is no connection between target and native. As the native sysroot is populated from nativesdk recipes, they shouldn’t be able to know what the final target actually is.
>
> Where you have crossover there currently needs to be a little magic, for example the nativesdk-cmake recipe has an environment.d script that takes the target configuration from the environment variables and generates CMake configuration.
Hi Ross,
Thanks for clarification, we referred how nativesdk-cmake recipe has
handling environment.d script(cmake.sh) it is Copying necessary files
into the SDK without expanding any values at build time but with rust.sh
and cargo.sh it will need to expand values at build time so we can't
adopt that.
And from your comments, we understand that target-specific components
should reside within the target sysroot, and only nativesdk components
should be placed in the native sysroot.
Based on this, we're now moving our ${TARGET_SYS}_environment-setup.d
directory to the target sysroot from native sysroot.
And now we observe the following target sysroots under sysroots
directory when using multilib:
x86_64-pokysdk-linux
x86-64-v3-poky-linux
x86-pokymllib32-linux
Is this what you are referring to, is our understanding correct with
this change?
Thanks,
Harish
>
> Ross
next prev parent reply other threads:[~2025-09-23 12:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 10:27 [PATCH v2 1/5] Revert "rust: remove redundant cargo config file" Harish.Sadineni
2025-09-15 10:27 ` [PATCH v2 2/5] toolchain-scripts.bbclass: Support target-specific environment setup scripts Harish.Sadineni
2025-09-18 15:59 ` [OE-core] " Ross Burton
2025-09-23 12:14 ` Harish Sadineni [this message]
2025-09-15 10:27 ` [PATCH v2 3/5] rust-cross-canadian: Add target-specific environment setup support Harish.Sadineni
2025-09-15 10:27 ` [PATCH v2 4/5] oeqa/sdk/cases/rust.py: Add test to verify cargo build builds for target Harish.Sadineni
2025-09-18 16:07 ` [OE-core] " Ross Burton
2025-09-15 10:27 ` [PATCH v2 5/5] rust-cross-canadian: fix cargo run failure for target in sdk Harish.Sadineni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d12886ad-409d-469e-b037-0590818d52c8@windriver.com \
--to=harish.sadineni@windriver.com \
--cc=Ross.Burton@arm.com \
--cc=Sundeep.Kokkonda@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=randy.macleod@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox