mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 10:53:52 +00:00
Merge pull request #132538 from sternenseemann/has-gold
binutils-unwrapped: expose if built with ld.gold
This commit is contained in:
commit
7195e6008a
@ -122,7 +122,8 @@ let
|
||||
# Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
|
||||
# But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
|
||||
# see #84670 and #49071 for more background.
|
||||
useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && !targetPlatform.isMusl);
|
||||
useLdGold = targetPlatform.linker == "gold" ||
|
||||
(targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
|
||||
|
||||
runtimeDeps = [
|
||||
targetPackages.stdenv.cc.bintools
|
||||
|
@ -131,7 +131,8 @@ let
|
||||
# Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
|
||||
# But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
|
||||
# see #84670 and #49071 for more background.
|
||||
useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && !targetPlatform.isMusl);
|
||||
useLdGold = targetPlatform.linker == "gold" ||
|
||||
(targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
|
||||
|
||||
runtimeDeps = [
|
||||
targetPackages.stdenv.cc.bintools
|
||||
|
@ -123,7 +123,8 @@ let
|
||||
# Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
|
||||
# But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
|
||||
# see #84670 and #49071 for more background.
|
||||
useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && !targetPlatform.isMusl);
|
||||
useLdGold = targetPlatform.linker == "gold" ||
|
||||
(targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
|
||||
|
||||
runtimeDeps = [
|
||||
targetPackages.stdenv.cc.bintools
|
||||
|
@ -133,7 +133,8 @@ let
|
||||
# Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
|
||||
# But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
|
||||
# see #84670 and #49071 for more background.
|
||||
useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && !targetPlatform.isMusl);
|
||||
useLdGold = targetPlatform.linker == "gold" ||
|
||||
(targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
|
||||
|
||||
runtimeDeps = [
|
||||
targetPackages.stdenv.cc.bintools
|
||||
|
@ -1,16 +1,24 @@
|
||||
let
|
||||
execFormatIsELF = platform: platform.parsed.kernel.execFormat.name == "elf";
|
||||
in
|
||||
|
||||
{ stdenv, lib, buildPackages
|
||||
, fetchFromGitHub, fetchurl, zlib, autoreconfHook, gettext
|
||||
# Enabling all targets increases output size to a multiple.
|
||||
, withAllTargets ? false, libbfd, libopcodes
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
, noSysDirs
|
||||
, gold ? true
|
||||
, gold ? execFormatIsELF stdenv.targetPlatform
|
||||
, bison ? null
|
||||
, flex
|
||||
, texinfo
|
||||
, perl
|
||||
}:
|
||||
|
||||
# configure silently disables ld.gold if it's unsupported,
|
||||
# so we need to make sure that intent matches result ourselves.
|
||||
assert gold -> execFormatIsELF stdenv.targetPlatform;
|
||||
|
||||
# Note: this package is used for bootstrapping fetchurl, and thus
|
||||
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
||||
# cgit) that are needed here should be included directly in Nixpkgs as
|
||||
@ -168,6 +176,7 @@ stdenv.mkDerivation {
|
||||
|
||||
passthru = {
|
||||
inherit targetPrefix;
|
||||
hasGold = gold;
|
||||
isGNU = true;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user