diff options
author | Artturin <Artturin@artturin.com> | 2023-06-22 22:53:46 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2023-06-22 22:53:46 +0300 |
commit | 257dd3165872b7758c6845869e922168ad9f1cb0 (patch) | |
tree | 2e7ee16ff041fbbc3b8661223acab17628058988 | |
parent | 64b25014367bae25dc745324cf2d3682154a8556 (diff) | |
download | nixpkgs-257dd3165872b7758c6845869e922168ad9f1cb0.tar nixpkgs-257dd3165872b7758c6845869e922168ad9f1cb0.tar.gz nixpkgs-257dd3165872b7758c6845869e922168ad9f1cb0.tar.bz2 nixpkgs-257dd3165872b7758c6845869e922168ad9f1cb0.tar.lz nixpkgs-257dd3165872b7758c6845869e922168ad9f1cb0.tar.xz nixpkgs-257dd3165872b7758c6845869e922168ad9f1cb0.tar.zst nixpkgs-257dd3165872b7758c6845869e922168ad9f1cb0.zip |
binutils-unwrapped: add option to have gold as ld
-rw-r--r-- | pkgs/development/tools/misc/binutils/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 0a2610ffd2e..fe9ec6a865f 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -18,6 +18,7 @@ in , zlib , enableGold ? withGold stdenv.targetPlatform +, enableGoldDefault ? false , enableShared ? !stdenv.hostPlatform.isStatic # WARN: Enabling all targets increases output size to a multiple. , withAllTargets ? false @@ -26,6 +27,7 @@ in # WARN: configure silently disables ld.gold if it's unsupported, so we need to # make sure that intent matches result ourselves. assert enableGold -> withGold stdenv.targetPlatform; +assert enableGoldDefault -> enableGold; let @@ -217,8 +219,10 @@ stdenv.mkDerivation (finalAttrs: { "--with-lib-path=:" ] ++ lib.optionals withAllTargets [ "--enable-targets=all" ] - ++ lib.optionals enableGold [ "--enable-gold" "--enable-plugins" ] - ++ (if enableShared + ++ lib.optionals enableGold [ + "--enable-gold${lib.optionalString enableGoldDefault "=default"}" + "--enable-plugins" + ] ++ (if enableShared then [ "--enable-shared" "--disable-static" ] else [ "--disable-shared" "--enable-static" ]) ; |