On Thu, 2022-07-28 at 21:56 +0100, Richard Purdie via
lists.openembedded.org wrote:
> On Tue, 2022-07-26 at 15:02 +0100, Richard Purdie via
> lists.openembedded.org wrote:
> > This patch:
> > * Uses RUST_{BUILD|HOST|TARGET}_SYS everywhere consistently within rust 
> > context
> > * Moves the on target libraries to rust's "sysroot" layout so the SDK can 
> > find
> >   libraries without prompting
> > * Moves the target SDK libraries into the target sysroot rather than the 
> > native one
> > * Enables the target rustc compiler to be built
> > * Replaces cargo-cross-canadian with nativesdk-cargo
> > 
> > * Drops rust-cross-XXX and uses rust-target-config to generate json config
> >   in each WORKDIR
> > * Add nativeksdk-rust as the SDK compiler
> > * Simplifies rust-cross-canadian-XXX to be the environment and json config
> >   for the target only (no binaries)
> > * Drop rust-crosssdk since it isnt needed now
> > * Drop a lot of the virtual/ compiler dependency mess since we don't need it
> > * Cargo cross-canadian environment config is compiled with 
> > rust-cross-canadian
> > * Adds RUST_{BUILD|HOST|TARGET}_SYS to the variable ignore list for hash 
> > purposes
> >   (since it should be accounted for in the build paths)
> > * Adds a slightly hacky approach to make target llvm-config work which 
> > removes
> >   the need for patching llvm.
> > * Drop rust-tools-cross-canadian and just build the tools as part of the 
> > main
> >   rust/nativesdk-rust recipe to avoid rebuilding large chunks of the 
> > toolchain
> > 
> > Work still remaining:
> > * Fully clean up the dependency simplification and removal of the virutal/
> >   code.
> > * Remove RUST_TARGETGENS since I think it is the same everywhere now
> > * The rust recipe doesn't need to always build stage0
> > * The rust recipe doesn't need to always build libstd-rs since
> >   we have a separate recipe. May drop the separate recipe and just copy
> >   the pieces out of the target rust build
> > * Maybe drop RUSTC variable, not sure it is used?
> > * Delete now unneeded rust-llvm llcm-config patch
> > 
> > Adding to an SDK looks like: TOOLCHAIN_LANGS += "rust"
> > 
> > Known issues:
> > * rust target compiler fails for musl:
> >   https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/5574
> >   https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/5588
> > * rust target packages have buildpaths warnings:
> >   
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/5585/steps/11/logs/stdio
> > * mips n32 target rust config and libstd-rs fails:
> >   https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/5607
> > * May be multilib variant issues:
> >   https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/5503
> >   https://autobuilder.yoctoproject.org/typhoon/#/builders/108/builds/3280
> > * Sundeep reported ld loader symbol relocation issues for libstdc++
> > * Breaks mingw build as currently configured
> >   https://autobuilder.yoctoproject.org/typhoon/#/builders/89/builds/5591
> 
> The patches in master-next further tweak and improve things. I have
> fixed the musl issue and many of the buildpaths ones as well as
> multilib and mingw. This means that we have remaining:
> 
> 1) buildpaths warnings:
> https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/5606
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/5602
> https://autobuilder.yoctoproject.org/typhoon/#/builders/108/builds/3294
> [and likely a few more as the build completes]
> down to two issues:
> stdio: WARNING: rust-1.62.0-r0 do_package_qa: QA Issue: File 
> /usr/bin/clippy-driver in package rust-tools-clippy contains reference to 
> TMPDIR [buildpaths]
> stdio: WARNING: rust-1.62.0-r0 do_package_qa: QA Issue: File 
> /usr/lib64/librustc_driver-ba615092564ddb01.so in package rust contains 
> reference to TMPDIR [buildpaths]
> stdio: WARNING: lib32-rust-1.62.0-r0 do_package_qa: QA Issue: File 
> /usr/lib/librustc_driver-a9887d06b965b287.so in package lib32-rust contains 
> reference to TMPDIR [buildpaths]
> stdio: WARNING: lib32-rust-1.62.0-r0 do_package_qa: QA Issue: File 
> /usr/bin/clippy-driver in package lib32-rust-tools-clippy contains reference 
> to TMPDIR [buildpaths]
> 
> clippy appears to have a sysroot path encoded into it, the rustc-driver
> is a path to llvm-config. I did try setting SYSROOT as an environment
> variable when building clippy with no success. I also tried making the
> llvm-config a script found via PATH but that failed to build. We may
> need to patch rust to deal with these.
> 
> 
> 2) mips n32 issue:
> https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/5624/steps/25/logs/stdio
> > LLVM ERROR: Not supported instr: <MCInst 0 <MCOperand Reg:433> <MCOperand 
> > Reg:338>>
> > LLVM ERROR: Not supported instr: <MCInst 0 <MCOperand Reg:422> <MCOperand 
> > Reg:1>>
> > warning: `libc` (lib) generated 2 warnings (2 duplicates)
> 
> when building libstd-rs which may mean my guesses at the target data options 
> are still wrong.
> 
> 
> 3) Sundeep reported ld loader symbol relocation issues for libstdc++
> 
> 
> 
> Fixing 1) is the priority as with that we can prepare the series for
> submission/review/merging. I'm taking some time away for the next few
> days so if anyone else wants to fix those...! :)
> 
> 3) probably needs retesting against the current patches. For 2), not
> sure.

4)
https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/5591/steps/11/logs/stdio

some kind of llvm-rust relocation error?

Cheers,

Richard


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

Reply via email to