Repository navigation
rustc_target: Add support of Openembedded/Yocto Linux ppc64 and ppc64… - #164866
jkrishnanjanappa wants to merge 1 commit into
Conversation
…le targets While building Rust standard libraries in Yocto, these targets use Openembedded-specific target triplets which are absent in the supported target list. Due to which Rust standard libraries build fails in Yocto. The Openembedded-specific target triplets of ppc64 and ppc64le use linker and other settings similar to existing ppc64 and ppc64le Linux GNU targets respectively. So, add Openembedded-specific target triplets for ppc64 and ppc64le to build Rust libraries in Yocto. Signed-off-by: Jagadeesh Krishnanjanappa <workjagadeesh@gmail.com>
|
These commits modify compiler targets. |
|
Thanks for the pull request, and welcome! The Rust Project has assigned @oli-obk (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
|
hmm... if you're building your own libstd anyway, can't you use the custom target scheme to add your targets? Do you have some links to where you're using this? |
I am building libstd-rs, which is a part of a distribution image using the Yocto project. The steps to build libstd-rs can be found at,
The libstd build failed without this change for ppc64 and ppc64le. On debugging, I found other OE (openembedded) supported targets Regards, |
|
@rustbot ready |
|
r? @davidtwco who seems to actually understand what is happening here 😅 |
|
While building libstd-rs recipe ( https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/rust/libstd-rs_1.98.1.bb?id=4ded97c2905d1c4ec7911d904cad3a5fce98255f ) for powerpc64 using Openembedded/Yocto project, the following error is observed as there are no powerpc64-oe-linux-gnu target. If we specify "--target powerpc64-unknown-linux-gnu" to workaround the missing target, the build again fails with the following error. The rust built-in powerpc64-unknown-linux-gnu target use "cc" as linker where as openembedded/Yocto cross-compilation toolchain use custom powerpc64-oe-linux-gcc as linker. The same behavior is true for powerpc64le using openembedded/Yocto cross-compilation toolchain. This PR solves both the errors. The discussions at #157650 and https://rust-lang.zulipchat.com/#narrow/channel/557100-yocto/topic/custom.20targets/near/594790061 helped me to understand the linker selection between powerpc64-unknown-linux-gnu and powerpc64-oe-linux-gnu. Thanks, |
rustc_target: Add support of Openembedded/Yocto Linux ppc64 and ppc64le targets
While building Rust standard libraries in Yocto, these targets use Openembedded-specific target triplets which are absent in the supported target list. Due to which Rust standard libraries build fails in Yocto.
The Openembedded-specific target triplets of ppc64 and ppc64le use linker and other settings similar to existing ppc64 and ppc64le Linux GNU targets respectively. So, add Openembedded-specific target triplets for ppc64 and ppc64le to build Rust libraries in Yocto.