pmaports/cross/crossdirect
Affe Null f0286576e7
cross/crossdirect: improve rust handling (MR 4234)
Add a cargo wrapper which appends a --target argument to the command
line. This makes cargo pass the --target argument to rustc for crates
being built for the target architecture, even if the target is the same
as the host. It will omit the --target argument for build scripts and
crates used in macros.

Check for this --target argument in the rustc wrapper and adjust the
library paths depending on its presence. The fallback that runs rustc
under qemu is no longer needed because macros are now built for the
native architecture and can be loaded into the native compiler without
any problems.

Also check if the arguments passed to rustc are "-vV". If this is the
case, we still need to fall back to the target rustc because the native
rustc will return the wrong architecture. If the wrong host architecture
is passed to a build script, it might try to look for a cross-compiler
or do something else that doesn't work.

[ci:skip-build]: already built successfully in CI
2023-07-24 08:32:10 +02:00
..
APKBUILD cross/crossdirect: improve rust handling (MR 4234) 2023-07-24 08:32:10 +02:00
cargo.sh cross/crossdirect: improve rust handling (MR 4234) 2023-07-24 08:32:10 +02:00
crossdirect.c cross/crossdirect: translate cc to gcc (MR 1545) 2020-09-11 13:27:08 +02:00
rust-qemu-linker.sh
rustc.sh cross/crossdirect: improve rust handling (MR 4234) 2023-07-24 08:32:10 +02:00