On Tue, 2022-06-28 at 11:00 +0200, Peter Bergin wrote:
On 2022-06-19 22:47, Peter Bergin wrote:
The reason for this issue seems to be this commit:
commit 781eaa955dce5deab47371c25dae72b36c011900 Author: Richard Purdie <richard.purdie@...> Date: Sat May 21 14:02:47 2022 +0100
rust-common: Drop LLVM_TARGET and simplify
This all seems over complicated for something which is basically always one of two values. This might even help cross-canadian work on something which isn't x86-64.
Signed-off-by: Richard Purdie <richard.purdie@...>
When building rust-cross-canadian-aarch64 the file 'tmp/work/x86_64-nativesdk-pokysdk-linux/rust-cross-canadian-aarch64/1.60.0-r0/targets/aarch64-poky-linux.json' will be populated with the information '"llvm-target": "x86_64-unknown-linux-gnu"'. This will lead to object files in wrong format during 'Building stage2 std artifacts (x86_64-unknown-linux-gnu -> aarch64-poky-linux)' in the do_compile step.
So for some reason it seems intentional to set 'llvm-target' to HOST_SYS when 'cross-canadian'. The behavior has changed with this patch. Before 'llvm-target' was set to RUST_TARGET_SYS for all target archs other than x86_64 where it was set to RUST_HOST_SYS. I guess this change has to do with the commit message 'This might even help cross-canadian work on something which isn't x86-64.'? But unfortunately it seems to break the case building on x86_64 for aarch64. It would be good to get some help here to sort this out.
Thanks for suggestion! Yes, that will solve the problem for my setup. I was just wondering if you had any purpose with this if-else clause that should be kept or fixed?
I can send a patch for this to oe-core if nothing more is needed to be fixed.