Skip to content

Commit

Permalink
rust: remove aarch64-linux workaround
Browse files Browse the repository at this point in the history
This commit reverts NixOS#209113, since aarch64-linux now uses GCC 12 by default.
  • Loading branch information
wegank committed Mar 1, 2023
1 parent f8b1031 commit 39a2b0b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
2 changes: 0 additions & 2 deletions pkgs/build-support/rust/hooks/cargo-setup-hook.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 0 additions & 3 deletions pkgs/build-support/rust/hooks/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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) {};

Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/rust/rustc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 39a2b0b

Please sign in to comment.