Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support external toolchains #76

Open
jmagnuson opened this issue Jul 9, 2020 · 0 comments
Open

Support external toolchains #76

jmagnuson opened this issue Jul 9, 2020 · 0 comments

Comments

@jmagnuson
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant