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
1 changed files with 4 additions and 0 deletions
|
@ -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