diff options
Diffstat (limited to 'pkgs/development/tools/misc/binutils/default.nix')
-rw-r--r-- | pkgs/development/tools/misc/binutils/default.nix | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index ac055171658b..de316d0e5e7f 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -19,10 +19,11 @@ in stdenv.mkDerivation rec { name = targetPrefix + basename; - src = fetchurl { + # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM + src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl { url = "mirror://gnu/binutils/${basename}.tar.bz2"; sha256 = "028cklfqaab24glva1ks2aqa1zxa6w6xmc8q34zs1sb7h22dxspg"; - }; + }); patches = [ # Turn on --enable-new-dtags by default to make the linker set @@ -64,13 +65,12 @@ stdenv.mkDerivation rec { # https://sourceware.org/bugzilla/show_bug.cgi?id=22868 ./gold-symbol-visibility.patch - ] ++ stdenv.lib.optional targetPlatform.isiOS ./support-ios.patch - ++ stdenv.lib.optionals targetPlatform.isAarch64 [ + # Version 2.30 introduced strict requirements on ELF relocations which cannot # be satisfied on aarch64 platform. Add backported fix from bugzilla. # https://sourceware.org/bugzilla/show_bug.cgi?id=22764 ./relax-R_AARCH64_ABS32-R_AARCH64_ABS16-absolute.patch - ]; + ] ++ stdenv.lib.optional targetPlatform.isiOS ./support-ios.patch; outputs = [ "out" "info" "man" ]; @@ -104,11 +104,7 @@ stdenv.mkDerivation rec { else "-static-libgcc"; # TODO(@Ericson2314): Always pass "--target" and always targetPrefix. - configurePlatforms = - # TODO(@Ericson2314): Figure out what's going wrong with Arm - if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32 - then [] - else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; + configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; configureFlags = [ "--enable-targets=all" "--enable-64-bit-bfd" @@ -121,6 +117,8 @@ stdenv.mkDerivation rec { "--enable-fix-loongson2f-nop" ] ++ optionals gold [ "--enable-gold" "--enable-plugins" ]; + doCheck = false; # fails + enableParallelBuilding = true; passthru = { |