summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/build-managers/cmake/default.nix4
-rw-r--r--pkgs/development/tools/build-managers/meson/default.nix4
-rw-r--r--pkgs/development/tools/documentation/doxygen/default.nix28
-rw-r--r--pkgs/development/tools/misc/binutils/default.nix65
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch (renamed from pkgs/development/tools/misc/binutils/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch)0
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch (renamed from pkgs/development/tools/misc/binutils/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch)0
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch (renamed from pkgs/development/tools/misc/binutils/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch)0
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.31/always-search-rpath.patch (renamed from pkgs/development/tools/misc/binutils/always-search-rpath.patch)0
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.31/build-components-separately.patch (renamed from pkgs/development/tools/misc/binutils/build-components-separately.patch)0
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.31/deterministic.patch (renamed from pkgs/development/tools/misc/binutils/deterministic.patch)0
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.31/disambiguate-arm-targets.patch (renamed from pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch)0
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.31/gold-symbol-visibility.patch (renamed from pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch)0
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.31/no-plugins.patch (renamed from pkgs/development/tools/misc/binutils/no-plugins.patch)0
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.34/always-search-rpath.patch14
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.34/build-components-separately.patch164
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.34/deterministic.patch12
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.34/disambiguate-arm-targets.patch23
-rw-r--r--pkgs/development/tools/misc/binutils/patches/2.34/no-plugins.patch21
18 files changed, 296 insertions, 39 deletions
diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix
index 010f1d9c6c2..01c97305807 100644
--- a/pkgs/development/tools/build-managers/cmake/default.nix
+++ b/pkgs/development/tools/build-managers/cmake/default.nix
@@ -20,12 +20,12 @@ stdenv.mkDerivation rec {
           + lib.optionalString useNcurses "-cursesUI"
           + lib.optionalString withQt5 "-qt5UI"
           + lib.optionalString useQt4 "-qt4UI";
-  version = "3.18.2";
+  version = "3.18.4";
 
   src = fetchurl {
     url = "${meta.homepage}files/v${lib.versions.majorMinor version}/cmake-${version}.tar.gz";
     # compare with https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}-SHA-256.txt
-    sha256 = "0zhxsnxm5d8wdarz2gs3r41r1dfrnh35ki75fa684gaxfzy40kjx";
+    sha256 = "0xsg5lw3i4bw610q987cwz3iz06x3lrbbaa2mnzyr4kaiqsn2z2r";
   };
 
   patches = [
diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix
index 1b9c3ef6477..32948adfb6c 100644
--- a/pkgs/development/tools/build-managers/meson/default.nix
+++ b/pkgs/development/tools/build-managers/meson/default.nix
@@ -9,11 +9,11 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "meson";
-  version = "0.55.3";
+  version = "0.56.0";
 
   src = python3.pkgs.fetchPypi {
     inherit pname version;
-    sha256 = "19cjy24mfaswxyvqmns6rd7hx05ybqb663zlgklspfr8l4jjmvbb";
+    sha256 = "04vj250bwrzq7c0z1r96b0z0vgirvn0m367wm3ygqmfdy67x6799";
   };
 
   patches = [
diff --git a/pkgs/development/tools/documentation/doxygen/default.nix b/pkgs/development/tools/documentation/doxygen/default.nix
index 772b654df93..613dec86d7c 100644
--- a/pkgs/development/tools/documentation/doxygen/default.nix
+++ b/pkgs/development/tools/documentation/doxygen/default.nix
@@ -1,15 +1,14 @@
-{ stdenv, cmake, fetchurl, python3, flex, bison, qt4, CoreServices, libiconv }:
+{ stdenv, cmake, fetchFromGitHub, python3, flex, bison, qt5, CoreServices, libiconv }:
 
 stdenv.mkDerivation rec {
-
-  name = "doxygen-1.8.19";
-
-  src = fetchurl {
-    urls = [
-      "mirror://sourceforge/doxygen/${name}.src.tar.gz" # faster, with https, etc.
-      "http://doxygen.nl/files/${name}.src.tar.gz"
-    ];
-    sha256 = "1lvqfw2yzba588c5ggl8yhw7aw4xkk44mrghsd9yqlajc48x25dc";
+  pname = "doxygen";
+  version = "1.8.20";
+
+  src = fetchFromGitHub {
+    owner = "doxygen";
+    repo = "doxygen";
+    rev = "Release_${stdenv.lib.replaceStrings [ "." ] [ "_" ] version}";
+    sha256 = "17chvi3i80rj4750smpizf562xjzd2xcv5rfyh997pyvc1zbq5rh";
   };
 
   nativeBuildInputs = [
@@ -20,19 +19,18 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs =
-       stdenv.lib.optional (qt4 != null) qt4
+       stdenv.lib.optionals (qt5 != null) (with qt5; [ qtbase wrapQtAppsHook ])
     ++ stdenv.lib.optional stdenv.isSunOS libiconv
     ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices libiconv ];
 
   cmakeFlags =
     [ "-DICONV_INCLUDE_DIR=${libiconv}/include" ] ++
-    stdenv.lib.optional (qt4 != null) "-Dbuild_wizard=YES";
+    stdenv.lib.optional (qt5 != null) "-Dbuild_wizard=YES";
 
   NIX_CFLAGS_COMPILE =
     stdenv.lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9";
 
-  enableParallelBuilding = true;
-  doCheck = false; # fails
+  enableParallelBuilding = false;
 
   meta = {
     license = stdenv.lib.licenses.gpl2Plus;
@@ -47,6 +45,6 @@ stdenv.mkDerivation rec {
       manual (in LaTeX) from a set of documented source files.
     '';
 
-    platforms = if qt4 != null then stdenv.lib.platforms.linux else stdenv.lib.platforms.unix;
+    platforms = if qt5 != null then stdenv.lib.platforms.linux else stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix
index b352e63a27c..c0846fce45c 100644
--- a/pkgs/development/tools/misc/binutils/default.nix
+++ b/pkgs/development/tools/misc/binutils/default.nix
@@ -8,6 +8,7 @@
 , bison ? null
 , flex
 , texinfo
+, perl
 }:
 
 # Note: this package is used for bootstrapping fetchurl, and thus
@@ -21,7 +22,10 @@ let
   # Remove gold-symbol-visibility patch when updating, the proper fix
   # is now upstream.
   # https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=330b90b5ffbbc20c5de6ae6c7f60c40fab2e7a4f;hp=99181ccac0fc7d82e7dabb05dc7466e91f1645d3
-  version = "2.31.1";
+  version = "${minorVersion}${patchVersion}";
+  minorVersion = if stdenv.targetPlatform.isOr1k then "2.34" else "2.31";
+  patchVersion = if stdenv.targetPlatform.isOr1k then     "" else   ".1";
+
   basename = "binutils";
   # The targetPrefix prepended to binary names to allow multiple binuntils on the
   # PATH to both be usable.
@@ -33,33 +37,49 @@ let
     rev = "708acc851880dbeda1dd18aca4fd0a95b2573b36";
     sha256 = "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63";
   };
-  # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM
-  normal-src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl {
+
+  # binutils sources not part of the bootstrap.
+  non-boot-src = (fetchurl {
     url = "mirror://gnu/binutils/${basename}-${version}.tar.bz2";
-    sha256 = "1l34hn1zkmhr1wcrgf0d4z7r3najxnw3cx2y2fk7v55zjlk3ik7z";
+    sha256 = {
+      "2.31.1" = "1l34hn1zkmhr1wcrgf0d4z7r3najxnw3cx2y2fk7v55zjlk3ik7z";
+      "2.34"   = "1rin1f5c7wm4n3piky6xilcrpf2s0n3dd5vqq8irrxkcic3i1w49";
+    }.${version};
   });
+
+  # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM
+  normal-src = stdenv.__bootPackages.binutils-unwrapped.src or non-boot-src;
+
+  # Platforms where we directly use the final source.
+  # Generally for cross-compiled platforms, where the boot source won't compile.
+  skipBootSrc = stdenv.targetPlatform.isOr1k;
+
+  # Select the specific source according to the platform in use.
+  src = if stdenv.targetPlatform.isVc4 then vc4-binutils-src
+    else if skipBootSrc then non-boot-src
+    else normal-src;
+
+  patchesDir = ./patches + "/${minorVersion}";
 in
 
 stdenv.mkDerivation {
   pname = targetPrefix + basename;
-  inherit version;
-
-  src = if stdenv.targetPlatform.isVc4 then vc4-binutils-src else normal-src;
+  inherit src version;
 
   patches = [
     # Make binutils output deterministic by default.
-    ./deterministic.patch
+    "${patchesDir}/deterministic.patch"
 
     # Bfd looks in BINDIR/../lib for some plugins that don't
     # exist. This is pointless (since users can't install plugins
     # there) and causes a cycle between the lib and bin outputs, so
     # get rid of it.
-    ./no-plugins.patch
+    "${patchesDir}/no-plugins.patch"
 
     # Help bfd choose between elf32-littlearm, elf32-littlearm-symbian, and
     # elf32-littlearm-vxworks in favor of the first.
     # https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766
-    ./disambiguate-arm-targets.patch
+    "${patchesDir}/disambiguate-arm-targets.patch"
 
     # For some reason bfd ld doesn't search DT_RPATH when cross-compiling. It's
     # not clear why this behavior was decided upon but it has the unfortunate
@@ -67,25 +87,30 @@ stdenv.mkDerivation {
     # shared objects when cross-compiling. Consequently, we are forced to
     # override this behavior, forcing ld to search DT_RPATH even when
     # cross-compiling.
-    ./always-search-rpath.patch
-
-  ] ++ lib.optionals (!stdenv.targetPlatform.isVc4)
-  [
+    "${patchesDir}/always-search-rpath.patch"
+  ]
+  # For version 2.31 exclusively
+  ++ lib.optionals (!stdenv.targetPlatform.isVc4 && minorVersion == "2.31") [
     # https://sourceware.org/bugzilla/show_bug.cgi?id=22868
-    ./gold-symbol-visibility.patch
+    ./patches/2.31/gold-symbol-visibility.patch
 
     # https://sourceware.org/bugzilla/show_bug.cgi?id=23428
     # un-break features so linking against musl doesn't produce crash-only binaries
-    ./0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
-    ./0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
-    ./0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch
-  ] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch;
+    ./patches/2.31/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
+    ./patches/2.31/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
+    ./patches/2.31/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch
+  ]
+  ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch
+  ;
 
   outputs = [ "out" "info" "man" ];
 
   depsBuildBuild = [ buildPackages.stdenv.cc ];
   nativeBuildInputs = [
     bison
+  ] ++ lib.optionals (lib.versionAtLeast version "2.34") [
+    perl
+    texinfo
   ] ++ (lib.optionals stdenv.targetPlatform.isiOS [
     autoreconfHook
   ]) ++ lib.optionals stdenv.targetPlatform.isVc4 [ texinfo flex ];
@@ -149,7 +174,7 @@ stdenv.mkDerivation {
   enableParallelBuilding = true;
 
   passthru = {
-    inherit targetPrefix;
+    inherit targetPrefix patchesDir;
   };
 
   meta = with lib; {
diff --git a/pkgs/development/tools/misc/binutils/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch b/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
index 5a047b0f070..5a047b0f070 100644
--- a/pkgs/development/tools/misc/binutils/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
+++ b/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
diff --git a/pkgs/development/tools/misc/binutils/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch b/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch
index ca50d9a57cd..ca50d9a57cd 100644
--- a/pkgs/development/tools/misc/binutils/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch
+++ b/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch
diff --git a/pkgs/development/tools/misc/binutils/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch b/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
index 866d6db8ce2..866d6db8ce2 100644
--- a/pkgs/development/tools/misc/binutils/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
+++ b/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
diff --git a/pkgs/development/tools/misc/binutils/always-search-rpath.patch b/pkgs/development/tools/misc/binutils/patches/2.31/always-search-rpath.patch
index 2e9956e6b6e..2e9956e6b6e 100644
--- a/pkgs/development/tools/misc/binutils/always-search-rpath.patch
+++ b/pkgs/development/tools/misc/binutils/patches/2.31/always-search-rpath.patch
diff --git a/pkgs/development/tools/misc/binutils/build-components-separately.patch b/pkgs/development/tools/misc/binutils/patches/2.31/build-components-separately.patch
index d3cd0d2131c..d3cd0d2131c 100644
--- a/pkgs/development/tools/misc/binutils/build-components-separately.patch
+++ b/pkgs/development/tools/misc/binutils/patches/2.31/build-components-separately.patch
diff --git a/pkgs/development/tools/misc/binutils/deterministic.patch b/pkgs/development/tools/misc/binutils/patches/2.31/deterministic.patch
index 736e0aca6ce..736e0aca6ce 100644
--- a/pkgs/development/tools/misc/binutils/deterministic.patch
+++ b/pkgs/development/tools/misc/binutils/patches/2.31/deterministic.patch
diff --git a/pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch b/pkgs/development/tools/misc/binutils/patches/2.31/disambiguate-arm-targets.patch
index abbfa73da05..abbfa73da05 100644
--- a/pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch
+++ b/pkgs/development/tools/misc/binutils/patches/2.31/disambiguate-arm-targets.patch
diff --git a/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch b/pkgs/development/tools/misc/binutils/patches/2.31/gold-symbol-visibility.patch
index 0fb05a482d1..0fb05a482d1 100644
--- a/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch
+++ b/pkgs/development/tools/misc/binutils/patches/2.31/gold-symbol-visibility.patch
diff --git a/pkgs/development/tools/misc/binutils/no-plugins.patch b/pkgs/development/tools/misc/binutils/patches/2.31/no-plugins.patch
index 9624b7976b7..9624b7976b7 100644
--- a/pkgs/development/tools/misc/binutils/no-plugins.patch
+++ b/pkgs/development/tools/misc/binutils/patches/2.31/no-plugins.patch
diff --git a/pkgs/development/tools/misc/binutils/patches/2.34/always-search-rpath.patch b/pkgs/development/tools/misc/binutils/patches/2.34/always-search-rpath.patch
new file mode 100644
index 00000000000..2e9956e6b6e
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/patches/2.34/always-search-rpath.patch
@@ -0,0 +1,14 @@
+diff --git a/ld/genscripts.sh b/ld/genscripts.sh
+index b6940d376d..0feb1adfd0 100755
+--- a/ld/genscripts.sh
++++ b/ld/genscripts.sh
+@@ -125,6 +125,9 @@ if test "x$NATIVE" = "xyes" ; then
+   USE_LIBPATH=yes
+ fi
+ 
++# TODO: why is this needed?
++USE_LIBPATH=yes
++
+ # Set the library search path, for libraries named by -lfoo.
+ # If LIB_PATH is defined (e.g., by Makefile) and non-empty, it is used.
+ # Otherwise, the default is set here.
diff --git a/pkgs/development/tools/misc/binutils/patches/2.34/build-components-separately.patch b/pkgs/development/tools/misc/binutils/patches/2.34/build-components-separately.patch
new file mode 100644
index 00000000000..38fa4934a28
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/patches/2.34/build-components-separately.patch
@@ -0,0 +1,164 @@
+diff --git a/bfd/configure.ac b/bfd/configure.ac
+index c5bfbd5d..45ad4c26 100644
+--- a/bfd/configure.ac
++++ b/bfd/configure.ac
+@@ -278,31 +278,19 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
+ 
+ LT_LIB_M
+ 
+-# When building a shared libbfd, link against the pic version of libiberty
+-# so that apps that use libbfd won't need libiberty just to satisfy any
+-# libbfd references.
+-# We can't do that if a pic libiberty is unavailable since including non-pic
+-# code would insert text relocations into libbfd.
+ SHARED_LIBADD=
+-SHARED_LDFLAGS=
++SHARED_LDFLAGS=-liberty
+ if test "$enable_shared" = "yes"; then
+-changequote(,)dnl
+-  x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
+-changequote([,])dnl
+-  if test -n "$x"; then
+-    SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
+-  fi
+-
+   case "${host}" in
+   # More hacks to build DLLs on Windows.
+   *-*-cygwin*)
+     SHARED_LDFLAGS="-no-undefined"
+-    SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
++    SHARED_LIBADD="-liberty -lintl -lcygwin -lkernel32"
+   ;;
+ 
+   # Use built-in libintl on macOS, since it is not provided by libc.
+   *-*-darwin*)
+-    SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
++    SHARED_LIBADD="-liberty -lintl"
+   ;;
+   esac
+ 
+diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
+index 4f06074a..6836c589 100644
+--- a/opcodes/Makefile.am
++++ b/opcodes/Makefile.am
+@@ -51,7 +51,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir)
+ endif
+ 
+ # This is where bfd.h lives.
+-BFD_H = ../bfd/bfd.h
++BFD_H = $(BFDDIR)/bfd.h
+ 
+ BUILD_LIBS = @BUILD_LIBS@
+ BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
+@@ -301,7 +301,7 @@ OFILES = @BFD_MACHINES@
+ # development.sh is used to determine -Werror default.
+ CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
+ 
+-AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
++AM_CPPFLAGS = -I. -I$(srcdir) -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
+ 
+ disassemble.lo: disassemble.c
+ if am__fastdepCC
+@@ -322,12 +322,21 @@ libopcodes_la_SOURCES =  dis-buf.c disassemble.c dis-init.c
+ # old version of libbfd, or to pick up libbfd for the wrong architecture
+ # if host != build. So for building with shared libraries we use a
+ # hardcoded path to libbfd.so instead of relying on the entries in libbfd.la.
+-libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@
++libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ libtool-soversion
+ libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@
+-libopcodes_la_LDFLAGS += -release `cat ../bfd/libtool-soversion` @SHARED_LDFLAGS@
++libopcodes_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@
+ # Allow dependency tracking to work on all the source files.
+ EXTRA_libopcodes_la_SOURCES = $(LIBOPCODES_CFILES)
+ 
++libtool-soversion:
++	@echo "creating $@"
++	bfd_soversion="$(VERSION)" ;\
++	. $(BFDDIR)/development.sh ;\
++	if test "$$development" = true ; then \
++	  bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
++	fi ;\
++	echo "$${bfd_soversion}" > $@
++
+ # libtool will build .libs/libopcodes.a.  We create libopcodes.a in
+ # the build directory so that we don't have to convert all the
+ # programs that use libopcodes.a simultaneously.  This is a hack which
+diff --git a/opcodes/configure.ac b/opcodes/configure.ac
+index 00be9c88..6e589ae4 100644
+--- a/opcodes/configure.ac
++++ b/opcodes/configure.ac
+@@ -86,6 +86,7 @@ AC_PROG_INSTALL
+ 
+ AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h)
+ ACX_HEADER_STRING
++GCC_HEADER_STDINT(bfd_stdint.h)
+ 
+ AC_CHECK_DECLS([basename, stpcpy])
+ 
+@@ -137,61 +138,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
+ 
+ LT_LIB_M
+ 
+-#Libs for generator progs
+-if test "x$cross_compiling" = "xno"; then
+-  BUILD_LIBS=../libiberty/libiberty.a
+-  BUILD_LIB_DEPS=$BUILD_LIBS
+-else
+-  # if cross-compiling, assume that the system provides -liberty
+-  # and that the version is compatible with new headers.
+-  BUILD_LIBS=-liberty
+-  BUILD_LIB_DEPS=
+-fi
+-BUILD_LIBS="$BUILD_LIBS $LIBINTL"
+-BUILD_LIB_DEPS="$BUILD_LIB_DEPS $LIBINTL_DEP"
++BUILD_LIBS="-liberty $LIBINTL"
++BUILD_LIB_DEPS="$LIBINTL_DEP"
+ 
+ AC_SUBST(BUILD_LIBS)
+ AC_SUBST(BUILD_LIB_DEPS)
+ 
+ # Horrible hacks to build DLLs on Windows and a shared library elsewhere.
+ SHARED_LDFLAGS=
+-SHARED_LIBADD=
++SHARED_LIBADD=-liberty
+ SHARED_DEPENDENCIES=
+ if test "$enable_shared" = "yes"; then
+-# When building a shared libopcodes, link against the pic version of libiberty
+-# so that apps that use libopcodes won't need libiberty just to satisfy any
+-# libopcodes references.
+-# We can't do that if a pic libiberty is unavailable since including non-pic
+-# code would insert text relocations into libopcodes.
+ # Note that linking against libbfd as we do here, which is itself linked
+ # against libiberty, may not satisfy all the libopcodes libiberty references
+ # since libbfd may not pull in the entirety of libiberty.
+-changequote(,)dnl
+-  x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
+-changequote([,])dnl
+-  if test -n "$x"; then
+-    SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
+-  fi
+-
+   case "${host}" in
+     *-*-cygwin*)
+       SHARED_LDFLAGS="-no-undefined"
+-      SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
++      SHARED_LIBADD="-lbfd -liberty -lintl -lcygwin"
+       ;;
+-   *-*-darwin*)
+-     SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}"
+-     SHARED_DEPENDENCIES="../bfd/libbfd.la"
+-     ;;
+     *)
+-      case "$host_vendor" in
+-        hp)
+-          SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}"
+-	  ;;
+-	*)
+-          SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}"
+-	  ;;
+-      esac
+-      SHARED_DEPENDENCIES="../bfd/libbfd.la"
++      SHARED_LIBADD="-lbfd ${SHARED_LIBADD}"
+       ;;
+   esac
+ 
diff --git a/pkgs/development/tools/misc/binutils/patches/2.34/deterministic.patch b/pkgs/development/tools/misc/binutils/patches/2.34/deterministic.patch
new file mode 100644
index 00000000000..736e0aca6ce
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/patches/2.34/deterministic.patch
@@ -0,0 +1,12 @@
+diff -ur orig/binutils-2.23.1/ld/ldlang.c binutils-2.23.1/ld/ldlang.c
+--- orig/ld/ldlang.c
++++ new/ld/ldlang.c
+@@ -3095,6 +3095,8 @@
+                           ldfile_output_machine))
+     einfo (_("%P%F:%s: can not set architecture: %E\n"), name);
+ 
++  link_info.output_bfd->flags |= BFD_DETERMINISTIC_OUTPUT;
++
+   link_info.hash = bfd_link_hash_table_create (link_info.output_bfd);
+   if (link_info.hash == NULL)
+     einfo (_("%P%F: can not create hash table: %E\n"));
diff --git a/pkgs/development/tools/misc/binutils/patches/2.34/disambiguate-arm-targets.patch b/pkgs/development/tools/misc/binutils/patches/2.34/disambiguate-arm-targets.patch
new file mode 100644
index 00000000000..abbfa73da05
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/patches/2.34/disambiguate-arm-targets.patch
@@ -0,0 +1,23 @@
+diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
+index 9f956d3..f5b61f1 100644
+--- a/bfd/elf32-arm.c
++++ b/bfd/elf32-arm.c
+@@ -19585,7 +19585,10 @@ elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
+ #undef  ELF_MAXPAGESIZE
+ #define ELF_MAXPAGESIZE			0x1000
+ 
++/* Prioritize elf32-*arm (priority 1) over elf32-*arm-vxworks (priority 2) */
++#define elf_match_priority 2
+ #include "elf32-target.h"
++#undef  elf_match_priority
+ 
+ 
+ /* Merge backend specific data from an object file to the output
+@@ -19974,4 +19977,7 @@ elf32_arm_symbian_plt_sym_val (bfd_vma i, const asection *plt,
+ #undef  ELF_MAXPAGESIZE
+ #define ELF_MAXPAGESIZE			0x8000
+ 
++/* Prioritize elf32-*arm (priority 1) over elf32-*arm-symbian (priority 2) */
++#define elf_match_priority 2
+ #include "elf32-target.h"
++#undef  elf_match_priority
diff --git a/pkgs/development/tools/misc/binutils/patches/2.34/no-plugins.patch b/pkgs/development/tools/misc/binutils/patches/2.34/no-plugins.patch
new file mode 100644
index 00000000000..68cf51b7dd3
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/patches/2.34/no-plugins.patch
@@ -0,0 +1,21 @@
+diff --git a/bfd/plugin.c b/bfd/plugin.c
+index 537ab60311..bfe7957f96 100644
+--- a/bfd/plugin.c
++++ b/bfd/plugin.c
+@@ -386,6 +386,7 @@ load_plugin (bfd *abfd)
+   if (plugin_program_name == NULL)
+     return found;
+ 
++#if 0
+   /* Try not to search the same dir twice, by looking at st_dev and
+      st_ino for the dir.  If we are on a file system that always sets
+      st_ino to zero or the actual st_ino is zero we might waste some
+@@ -437,7 +438,7 @@ load_plugin (bfd *abfd)
+       if (found)
+ 	break;
+     }
+-
++#endif
+   return found;
+ }
+