Skip to content

Commit

Permalink
ghc: don't use ld.gold with musl libc (fixes NixOS#84670)
Browse files Browse the repository at this point in the history
ld.gold doesn't play well with musl as is documented in NixOS#49071 and
https://sourceware.org/bugzilla/show_bug.cgi?id=23856

(cherry picked from commit 4675649)
  • Loading branch information
adamse authored and nomeata committed Jun 25, 2020
1 parent bff1f7b commit ee1a24c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/8.10.1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ let

targetCC = builtins.head toolsForTarget;

useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false);
useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;

in
stdenv.mkDerivation (rec {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/8.4.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ let

targetCC = builtins.head toolsForTarget;

useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false);
useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;

in
stdenv.mkDerivation (rec {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/8.6.5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ let

targetCC = builtins.head toolsForTarget;

useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false);
useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;

in
stdenv.mkDerivation (rec {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/8.8.1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ let

targetCC = builtins.head toolsForTarget;

useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false);
useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;

in
stdenv.mkDerivation (rec {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/8.8.2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ let

targetCC = builtins.head toolsForTarget;

useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false);
useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;

in
stdenv.mkDerivation (rec {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/8.8.3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ let

targetCC = builtins.head toolsForTarget;

useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false);
useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;

in
stdenv.mkDerivation (rec {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/head.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ let

targetCC = builtins.head toolsForTarget;

useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false);
useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;

in
stdenv.mkDerivation (rec {
Expand Down

0 comments on commit ee1a24c

Please sign in to comment.