mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 21:50:55 +00:00
Merge pull request #66617 from transumption-unstable/201908/rust-aarch64-linux-musl
buildRustPackage: fix cross-compilation to aarch64-unknown-linux-musl
This commit is contained in:
commit
17a6ae03cb
|
@ -86,6 +86,10 @@ stdenv.mkDerivation (args // {
|
|||
${stdenv.lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) ''
|
||||
[target."${rustHostConfig}"]
|
||||
"linker" = "${ccForHost}"
|
||||
${# https://github.com/rust-lang/rust/issues/46651#issuecomment-433611633
|
||||
stdenv.lib.optionalString (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isAarch64) ''
|
||||
"rustflags" = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc" ]
|
||||
''}
|
||||
''}
|
||||
EOF
|
||||
|
||||
|
|
Loading…
Reference in a new issue