On 2022-12-16 12:09, Alex Kiernan via lists.openembedded.org wrote:
On Fri, Dec 16, 2022 at 2:16 PM Richard Purdie
<[email protected]> wrote:
On Fri, 2022-12-16 at 10:42 +0000, Alex Kiernan wrote:
Does anyone actually use target rust?
Hi Alex,
I'm not aware of anyone currently *needing* rust on target but
when (if?) we support rust in the kernel, then we'll also need
rust on target since we have a requirement to build the kernel /
kernel modules on target.
I thought we had some test
coverage, but I'm failing to find it.
A basic hello world on target:
https://git.yoctoproject.org/poky/tree/meta/lib/oeqa/runtime/cases/rust.py
but we could do with something more along the lines of:
https://git.yoctoproject.org/poky/tree/meta/lib/oeqa/runtime/cases/gcc.py
adding.
We do also have:
https://git.yoctoproject.org/poky/tree/meta/lib/oeqa/sdk/cases/rust.py
which are basic tests for rust in the SDK.
After the thread on stable/beta/nightly, I started playing with it on
target and so far have:
* we're missing the rustlib/<target>/target.json
* we don't have gcc/binutils in RDEPENDS so there's no linker
* no libc-dev/libgcc-dev
I'm not sure how target dev tools ever get used/installed as it's not
something I've ever touched, so maybe the last one/two are expected?
But the missing target.json just makes rustc bail on startup - looks
like 16b4ac3f558f ("rust: Enable nativesdk and target builds + replace
rust-tools-cross-canadian") might be where it got dropped, just
checking.
On target rust never worked.
I don't know if it ever worked in meta-rust - a number of the
fixes/patches I came across from that time suggested it might have
done, but it was years ago.
I made it build and tried to clean up a
variety of things but I moved on to other things before getting to the
target toolchain/runtime testing. Patches to move forward welcome,
especially with tests. The work I did was to at least try and get
things onto a proper footing for the future.
I'll have a look at some tests, since having figured out how to make
it work, I'd rather it didn't regress, even if I don't actually intend
to use it!
With the target.json patch I sent up, plus gcc binutils libc-dev
libgcc-dev added to an image `rustc` on target generates working
binaries.
Great!
Thanks,
../Randy
--
# Randy MacLeod
# Wind River Linux
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#174831):
https://lists.openembedded.org/g/openembedded-core/message/174831
Mute This Topic: https://lists.openembedded.org/mt/95707414/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-