From 39a2b0b3bf1849354e033a8752e3eff484195ebc Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 1 Mar 2023 18:42:07 +0200 Subject: [PATCH] rust: remove aarch64-linux workaround This commit reverts #209113, since aarch64-linux now uses GCC 12 by default. --- pkgs/build-support/rust/hooks/cargo-setup-hook.sh | 2 -- pkgs/build-support/rust/hooks/default.nix | 3 --- pkgs/development/compilers/rust/rustc.nix | 4 +--- pkgs/top-level/all-packages.nix | 2 -- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/pkgs/build-support/rust/hooks/cargo-setup-hook.sh b/pkgs/build-support/rust/hooks/cargo-setup-hook.sh index 90a81d68b5200..bdd9db8766fa7 100644 --- a/pkgs/build-support/rust/hooks/cargo-setup-hook.sh +++ b/pkgs/build-support/rust/hooks/cargo-setup-hook.sh @@ -1,8 +1,6 @@ cargoSetupPostUnpackHook() { echo "Executing cargoSetupPostUnpackHook" - export NIX_LDFLAGS+=" @aarch64LinuxGccWorkaround@" - # Some cargo builds include build hooks that modify their own vendor # dependencies. This copies the vendor directory into the build tree and makes # it writable. If we're using a tarball, the unpackFile hook already handles diff --git a/pkgs/build-support/rust/hooks/default.nix b/pkgs/build-support/rust/hooks/default.nix index b4034120103ed..168224e39b359 100644 --- a/pkgs/build-support/rust/hooks/default.nix +++ b/pkgs/build-support/rust/hooks/default.nix @@ -108,9 +108,6 @@ in { host-config = true target-applies-to-host = true ''; - - # https://github.com/NixOS/nixpkgs/issues/201254 - aarch64LinuxGccWorkaround = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc"; }; } ./cargo-setup-hook.sh) {}; diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 722d963c4777a..7cb6f22c949b4 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -54,9 +54,7 @@ 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" - # https://github.com/NixOS/nixpkgs/issues/201254 - ++ optional (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc"); + ++ optional stdenv.isDarwin "-rpath ${llvmSharedForHost}/lib"); # Increase codegen units to introduce parallelism within the compiler. RUSTFLAGS = "-Ccodegen-units=10"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9abcaa1ddba0e..94634617d3dc7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15806,8 +15806,6 @@ with pkgs; rust_1_67 = callPackage ../development/compilers/rust/1_67.nix { inherit (darwin.apple_sdk.frameworks) CoreFoundation Security SystemConfiguration; llvm_15 = llvmPackages_15.libllvm; - # https://github.com/NixOS/nixpkgs/issues/201254 - stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc11Stdenv else stdenv; }; rust = rust_1_67;