-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rustc cross-compiling to aarch64-unknown-linux-gnu uses wrong compiler #82519
Comments
The issue comes from it using the wrong |
This comment has been minimized.
This comment has been minimized.
Ah, my bad, I missed that this is not about rustbuild, but about using rustc in crosscompiling regular programs. As far as I know there are no such heuristics when invoking plain rustc. It is a responsibility of the user to specify the linkers etc to use (via e.g. |
still uses the incorrect compiler and linker ( |
That would mean its either a bug in cargo, or cargo can't find your cargo config (as documented here). Where did you put the file with these contents? Another caveat is that you want to use |
Cargo.toml works now. Thank you for the help. |
Cross compiling from x86_64 to aarch64 uses
/usr/bin/ld
instead of/usr/bin/aarch64-linux-gnu-ld
This happens using stable and nightly version of rust toolchians/targets
Code
any simple code
Meta
rustc --version --verbose
:Error output
RUST_BACKTRACE=1 cargo build --target aarch64-unknown-linux-gnu
file plage-7843fadef320354a.1115kt21cxrb61jx.rcgu.o
The text was updated successfully, but these errors were encountered: