rust-embedded / rust-embedded/meta-rust-bin
Support external toolchains
Nobody has claimed this yet.
- Dominant language
- BitBake
- Stars
- 124
- Forks
- 92
- Avg merge
- 6h 54m
- Merged PRs (30d)
- 2
Description
Currently, gcc-cross-${TARGET_ARCH} is hard-coded, resulting in failure if something like external-arm-toolchain is used instead:
ERROR: Nothing PROVIDES 'gcc-cross-arm' (but /home/jon/src/jmagnuson/yocto/rpi0/layers/meta-rust-bin/recipes-devtools/rust/rust-bin-cross_1.44.0.bb DEPENDS on or otherwise requires it)
gcc-cross-arm was skipped: PREFERRED_PROVIDER_virtual/arm-none-linux-gnueabihf-gcc set to external-arm-toolchain, not gcc-cross-arm
gcc-cross-arm was skipped: PREFERRED_PROVIDER_virtual/arm-none-linux-gnueabihf-gcc set to external-arm-toolchain, not gcc-cross-arm
gcc-cross-arm was skipped: PREFERRED_PROVIDER_virtual/arm-none-linux-gnueabihf-gcc set to external-arm-toolchain, not gcc-cross-arm
gcc-cross-arm was skipped: PREFERRED_PROVIDER_virtual/arm-none-linux-gnueabihf-gcc set to external-arm-toolchain, not gcc-cross-arm
NOTE: Runtime target 'hello-rust' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['hello-rust', 'cargo-bin-cross-arm', 'rust-bin-cross-arm', 'gcc-cross-arm']
ERROR: Required build target 'packagegroup-rpi-test' has no buildable providers.
Missing or unbuildable dependency chain was: ['packagegroup-rpi-test', 'hello-rust', 'cargo-bin-cross-arm', 'rust-bin-cross-arm', 'gcc-cross-arm']
Patching directly works:
diff --git a/recipes-devtools/rust/rust-bin-cross.inc b/recipes-devtools/rust/rust-bin-cross.inc
index 25ca590..0145503 100644
--- a/recipes-devtools/rust/rust-bin-cross.inc
+++ b/recipes-devtools/rust/rust-bin-cross.inc
@@ -7,7 +7,7 @@ inherit cross
inherit rust-common
# Required to link binaries
-DEPENDS += "gcc-cross-${TARGET_ARCH}"
+DEPENDS += "external-${TARGET_ARCH}-toolchain"
PN = "rust-bin-cross-${TARGET_ARCH}"
but the long-term solution would be to determine which to pull in at build time. Checking the environment for TCMODE or EXTERNAL_TOOLCHAIN could work, or possibly just using virtual/${TARGET_PREFIX}gcc itself.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in recipes-devtools/rust/rust-bin-cross.inc, where the cross-toolchain dependency is hard-coded to gcc-cross-${TARGET_ARCH}. Review the issue's alternatives involving TCMODE, EXTERNAL_TOOLCHAIN, or virtual/${TARGET_PREFIX}gcc, then validate the result by building with external-arm-toolchain without the gcc-cross-arm provider error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100