Skip to content

Commit

Permalink
Merge pull request #219425 from wegank/gcc12-cleanup
Browse files Browse the repository at this point in the history
treewide: remove -lgcc from NIX_LDFLAGS
  • Loading branch information
K900 committed Mar 6, 2023
2 parents a5961d9 + 050524c commit 2fe3640
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 61 deletions.
3 changes: 0 additions & 3 deletions pkgs/applications/emulators/dolphin-emu/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ stdenv.mkDerivation rec {
"--set QT_QPA_PLATFORM xcb"
];

# https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";

# Use nix-provided libraries instead of submodules
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace CMakeLists.txt \
Expand Down
3 changes: 0 additions & 3 deletions pkgs/applications/networking/browsers/ladybird/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ stdenv.mkDerivation {
"-Daligned_alloc=_mm_malloc"
]);

# https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";

# https://github.com/SerenityOS/serenity/issues/10055
postInstall = lib.optionalString stdenv.isDarwin ''
install_name_tool -add_rpath $out/lib $out/bin/ladybird
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ stdenv.mkDerivation rec {
"-DCOMPILE_QML=ON" # see https://github.com/Nheko-Reborn/nheko/issues/389
];

# https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";

preFixup = lib.optionalString voipSupport ''
# add gstreamer plugins path to the wrapper
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
Expand Down
3 changes: 0 additions & 3 deletions pkgs/applications/science/misc/root/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,6 @@ stdenv.mkDerivation rec {
"-Druntime_cxxmodules=OFF"
];

# https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";

# Workaround the xrootd runpath bug #169677 by prefixing [DY]LD_LIBRARY_PATH with ${lib.makeLibraryPath xrootd}.
# TODO: Remove the [DY]LDLIBRARY_PATH prefix for xrootd when #200830 get merged.
postInstall = ''
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/libraries/bobcat/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ stdenv.mkDerivation rec {
patchShebangs .
'';

# have to link to static gcc lib on aarch64-linux explicitly
# https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = lib.optionalString (with stdenv.targetPlatform; isAarch64 && isLinux) "-lgcc";

buildPhase = ''
./build libraries all
./build man
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/libraries/mtxclient/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ stdenv.mkDerivation rec {
spdlog
];

# https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";

meta = with lib; {
description = "Client API library for the Matrix protocol.";
homepage = "https://github.com/Nheko-Reborn/mtxclient";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ stdenv.mkDerivation rec {
"-DCMAKE_LIBRARY_PATH=${cudaPackages.cudatoolkit}/lib64/stubs"
];

# https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";

postInstall = lib.strings.optionalString enablePython ''
export OPENMM_LIB_PATH=$out/lib
export OPENMM_INCLUDE_PATH=$out/include
Expand Down
3 changes: 0 additions & 3 deletions pkgs/tools/misc/rpm-ostree/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ stdenv.mkDerivation rec {
env NOCONFIGURE=1 ./autogen.sh
'';

# https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";

meta = with lib; {
description = "A hybrid image/package system. It uses OSTree as an image format, and uses RPM as a component model";
homepage = "https://coreos.github.io/rpm-ostree/";
Expand Down
3 changes: 0 additions & 3 deletions pkgs/tools/networking/zerotierone/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ replace-with = "vendored-sources"' >> ./zeroidc/.cargo/config.toml

outputs = [ "out" "man" ];

# https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";

meta = with lib; {
description = "Create flat virtual Ethernet networks of almost unlimited size";
homepage = "https://www.zerotier.com";
Expand Down
40 changes: 7 additions & 33 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2318,8 +2318,6 @@ with pkgs;
inherit (darwin) moltenvk;
stdenv =
if stdenv.isDarwin && stdenv.isAarch64 then llvmPackages_14.stdenv
# https://github.com/NixOS/nixpkgs/issues/201254
else if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc12Stdenv
else stdenv;
};

Expand Down Expand Up @@ -4984,13 +4982,9 @@ with pkgs;
cairo = cairo.override { xcbSupport = true; };
};

hyprland = callPackage ../applications/window-managers/hyprwm/hyprland {
stdenv = gcc12Stdenv;
};
hyprland = callPackage ../applications/window-managers/hyprwm/hyprland { };

hyprpaper = callPackage ../applications/window-managers/hyprwm/hyprpaper {
stdenv = gcc12Stdenv;
};
hyprpaper = callPackage ../applications/window-managers/hyprwm/hyprpaper { };

hysteria = callPackage ../tools/networking/hysteria { };

Expand Down Expand Up @@ -8814,12 +8808,7 @@ with pkgs;
wrapKakoune = kakoune: attrs: callPackage ../applications/editors/kakoune/wrapper.nix (attrs // { inherit kakoune; });
kakounePlugins = recurseIntoAttrs (callPackage ../applications/editors/kakoune/plugins { });

kakoune-unwrapped = callPackage ../applications/editors/kakoune {
# See comments on https://github.com/NixOS/nixpkgs/pull/198836
# Remove below when stdenv for linux-aarch64 become recent enough.
# https://github.com/NixOS/nixpkgs/issues/201254
stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc12Stdenv else stdenv;
};
kakoune-unwrapped = callPackage ../applications/editors/kakoune { };
kakoune = wrapKakoune kakoune-unwrapped {
plugins = [ ]; # override with the list of desired plugins
};
Expand Down Expand Up @@ -11716,8 +11705,6 @@ with pkgs;

rpm-ostree = callPackage ../tools/misc/rpm-ostree {
gperf = gperf_3_0;
# https://github.com/NixOS/nixpkgs/issues/201254
stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc12Stdenv else stdenv;
};

rpm2targz = callPackage ../tools/archivers/rpm2targz { };
Expand Down Expand Up @@ -19269,11 +19256,7 @@ with pkgs;
else callPackage ../os-specific/linux/bionic-prebuilt { };


bobcat = callPackage ../development/libraries/bobcat {
# C++20 is required, aarch64-linux has gcc 9 by default
# https://github.com/NixOS/nixpkgs/issues/201254
stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc12Stdenv else stdenv;
};
bobcat = callPackage ../development/libraries/bobcat { };

boehmgc = callPackage ../development/libraries/boehm-gc { };

Expand Down Expand Up @@ -22475,10 +22458,7 @@ with pkgs;

mtpfs = callPackage ../tools/filesystems/mtpfs { };

mtxclient = callPackage ../development/libraries/mtxclient {
# https://github.com/NixOS/nixpkgs/issues/201254
stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc12Stdenv else stdenv;
};
mtxclient = callPackage ../development/libraries/mtxclient { };

mu = callPackage ../tools/networking/mu {
texinfo = texinfo4;
Expand Down Expand Up @@ -31173,8 +31153,7 @@ with pkgs;
ladspa-sdk = callPackage ../applications/audio/ladspa-sdk { };

ladybird = qt6Packages.callPackage ../applications/networking/browsers/ladybird {
# https://github.com/NixOS/nixpkgs/issues/201254
stdenv = if stdenv.isDarwin then llvmPackages_14.stdenv else gcc12Stdenv;
stdenv = if stdenv.isDarwin then llvmPackages_14.stdenv else stdenv;
};

lazpaint = callPackage ../applications/graphics/lazpaint { };
Expand Down Expand Up @@ -32192,10 +32171,7 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Foundation;
};

nheko = libsForQt5.callPackage ../applications/networking/instant-messengers/nheko {
# https://github.com/NixOS/nixpkgs/issues/201254
stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc12Stdenv else stdenv;
};
nheko = libsForQt5.callPackage ../applications/networking/instant-messengers/nheko { };

nomacs = libsForQt5.callPackage ../applications/graphics/nomacs { };

Expand Down Expand Up @@ -37546,8 +37522,6 @@ with pkgs;
root = callPackage ../applications/science/misc/root {
python = python3;
inherit (darwin.apple_sdk.frameworks) Cocoa CoreSymbolication OpenGL;
# https://github.com/NixOS/nixpkgs/issues/201254
stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc12Stdenv else stdenv;
};

root5 = lowPrio (callPackage ../applications/science/misc/root/5.nix {
Expand Down

0 comments on commit 2fe3640

Please sign in to comment.