diff options
author | Winter <winter@winter.cafe> | 2023-01-04 18:15:20 -0500 |
---|---|---|
committer | Winter <winter@winter.cafe> | 2023-01-04 18:15:20 -0500 |
commit | 8442601c6445894b350e8b2b10717c1f609bedaf (patch) | |
tree | 64e91fa74b1ce7e9e9a2e7214dcba06ea1897fb2 /pkgs/development/compilers/rust | |
parent | ccb3146bf27b954399648f7d12c3af8efeab1f13 (diff) | |
download | nixlib-8442601c6445894b350e8b2b10717c1f609bedaf.tar nixlib-8442601c6445894b350e8b2b10717c1f609bedaf.tar.gz nixlib-8442601c6445894b350e8b2b10717c1f609bedaf.tar.bz2 nixlib-8442601c6445894b350e8b2b10717c1f609bedaf.tar.lz nixlib-8442601c6445894b350e8b2b10717c1f609bedaf.tar.xz nixlib-8442601c6445894b350e8b2b10717c1f609bedaf.tar.zst nixlib-8442601c6445894b350e8b2b10717c1f609bedaf.zip |
rust: fix on aarch64-linux by using GCC 11 and passing `-lgcc`
This change switches to using GCC 11 by default on aarch64-linux, as well as passing `-lgcc` to the linker, per #201485. See #201254 and #208412 for wider context on the issue.
Diffstat (limited to 'pkgs/development/compilers/rust')
-rw-r--r-- | pkgs/development/compilers/rust/rustc.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 43d603923c97..64254d502529 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -52,7 +52,9 @@ in stdenv.mkDerivation rec { # when linking stage1 libstd: cc: undefined reference to `__cxa_begin_catch' optional (stdenv.isLinux && !withBundledLLVM) "--push-state --as-needed -lstdc++ --pop-state" ++ optional (stdenv.isDarwin && !withBundledLLVM) "-lc++" - ++ optional stdenv.isDarwin "-rpath ${llvmSharedForHost}/lib"); + ++ optional stdenv.isDarwin "-rpath ${llvmSharedForHost}/lib" + # https://github.com/NixOS/nixpkgs/issues/201254 + ++ optional (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc"); # Increase codegen units to introduce parallelism within the compiler. RUSTFLAGS = "-Ccodegen-units=10"; |