Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Binutils
@ 2022-09-16 10:59 oreo639
  2022-09-16 11:09 ` [PR PATCH] [Updated] binutils: update to 2.39 oreo639
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: oreo639 @ 2022-09-16 10:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1927 bytes --]

There is a new pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

Binutils
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Most of the testing for this was done as apart of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split upon request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since it doesn't use `dis-asm.h` afaict)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 16594 bytes --]

From a03b446869c3117c19eb1932cca2bf8dbbb18633 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 1/3] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 1a4e1ca3d594..b04268908c2e 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="q66 <daniel@octaforge.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 88b2a1b50a3e952ace1f9d7740e04ed17270ec15 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 2/3] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 21 ++++--
 4 files changed, 85 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..71895f2073fd 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,9 +83,10 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
@@ -142,7 +150,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From 2124d1876ba49b8aad84231b821085f7d3855b6f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:47:32 -0700
Subject: [PATCH 3/3] kcov: fix build with binutils 2.39

---
 .../0001-Fix-build-with-binutils-2.39.patch   | 97 +++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch

diff --git a/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
new file mode 100644
index 000000000000..5e666aacefc9
--- /dev/null
+++ b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
@@ -0,0 +1,97 @@
+From fd1a4fd2f02cee49afd74e427e38c61b89154582 Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Wed, 14 Sep 2022 16:02:17 -0700
+Subject: [PATCH] Fix build with binutils 2.39
+
+---
+ src/CMakeLists.txt              | 20 +++++++++++++++++++-
+ src/parsers/bfd-disassembler.cc | 23 +++++++++++++++++++++++
+ 2 files changed, 42 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3b751852..fc396827 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -94,6 +94,7 @@ set (DISASSEMBLER_SRCS
+ )
+ 
+ set (HAS_LIBBFD "0")
++set (HAS_LIBBFD_DISASM_STYLED "0")
+ 
+ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 	if (LIBBFD_FOUND)
+@@ -106,6 +107,23 @@ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STR
+ 			${LIBBFD_BFD_LIBRARY}
+ 			${LIBBFD_IBERTY_LIBRARY}
+ 		)
++		include(CheckCSourceCompiles)
++		set(CMAKE_REQUIRED_LIBRARIES ${DISASSEMBLER_LIBRARIES})
++		check_c_source_compiles("
++		#define PACKAGE
++		#define PACKAGE_VERSION
++		#include <stdio.h>
++		#include <dis-asm.h>
++
++		int main(int argc, char **argv){
++			struct disassemble_info info;
++			init_disassemble_info(&info, stdout, NULL, NULL);
++			return 0;
++		}
++		" TEST_LIBBFD_DISASM_STYLED)
++		if (TEST_LIBBFD_DISASM_STYLED)
++			set (HAS_LIBBFD_DISASM_STYLED "1")
++		endif (TEST_LIBBFD_DISASM_STYLED)
+ 	endif (LIBBFD_FOUND)
+ endif (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 
+@@ -284,7 +302,7 @@ set (KCOV_SYSTEM_MODE_SRCS
+ 
+ set (KCOV_LIBRARY_PREFIX "/tmp")
+ 
+-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD}")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD} -DKCOV_LIBFD_DISASM_STYLED=${HAS_LIBBFD_DISASM_STYLED}")
+ 
+ include_directories(
+ 	include/
+diff --git a/src/parsers/bfd-disassembler.cc b/src/parsers/bfd-disassembler.cc
+index 43653ee0..28815961 100644
+--- a/src/parsers/bfd-disassembler.cc
++++ b/src/parsers/bfd-disassembler.cc
+@@ -75,7 +75,11 @@ class BfdDisassembler : public IDisassembler
+ 	BfdDisassembler()
+ 	{
+ 		memset(&m_info, 0, sizeof(m_info));
++#if KCOV_LIBFD_DISASM_STYLED
++		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic, BfdDisassembler::opcodesFprintStyledFuncStatic);
++#else
+ 		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic);
++#endif
+ 		m_disassembler = print_insn_i386;
+ 
+ 		m_info.arch = bfd_arch_i386;
+@@ -407,6 +411,25 @@ class BfdDisassembler : public IDisassembler
+ 		return out;
+ 	}
+ 
++#if KCOV_LIBFD_DISASM_STYLED
++	static int opcodesFprintStyledFuncStatic(void *info, enum disassembler_style style, const char *fmt, ...)
++	{
++		(void)style;
++		BfdDisassembler *pThis = (BfdDisassembler *)info;
++		char str[64];
++		int out;
++
++		va_list args;
++		va_start (args, fmt);
++		out = vsnprintf( str, sizeof(str) - 1, fmt, args );
++		va_end (args);
++
++		pThis->opcodesFprintFunc(str);
++
++		return out;
++	}
++#endif
++
+ 	typedef std::map<uint64_t, Section *> SectionCache_t;
+ 	typedef std::unordered_map<uint64_t, Instruction> InstructionAddressMap_t;
+ 	typedef std::map<uint64_t, Instruction *> InstructionOrderedMap_t;

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
@ 2022-09-16 11:09 ` oreo639
  2022-09-16 11:17 ` oreo639
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-16 11:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Most of the testing for this was done as apart of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since it doesn't use `dis-asm.h` afaict)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 17522 bytes --]

From a03b446869c3117c19eb1932cca2bf8dbbb18633 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 1/4] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 1a4e1ca3d594..b04268908c2e 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="q66 <daniel@octaforge.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 88b2a1b50a3e952ace1f9d7740e04ed17270ec15 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 2/4] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 21 ++++--
 4 files changed, 85 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..71895f2073fd 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,9 +83,10 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
@@ -142,7 +150,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From 2124d1876ba49b8aad84231b821085f7d3855b6f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:47:32 -0700
Subject: [PATCH 3/4] kcov: fix build with binutils 2.39

---
 .../0001-Fix-build-with-binutils-2.39.patch   | 97 +++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch

diff --git a/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
new file mode 100644
index 000000000000..5e666aacefc9
--- /dev/null
+++ b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
@@ -0,0 +1,97 @@
+From fd1a4fd2f02cee49afd74e427e38c61b89154582 Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Wed, 14 Sep 2022 16:02:17 -0700
+Subject: [PATCH] Fix build with binutils 2.39
+
+---
+ src/CMakeLists.txt              | 20 +++++++++++++++++++-
+ src/parsers/bfd-disassembler.cc | 23 +++++++++++++++++++++++
+ 2 files changed, 42 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3b751852..fc396827 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -94,6 +94,7 @@ set (DISASSEMBLER_SRCS
+ )
+ 
+ set (HAS_LIBBFD "0")
++set (HAS_LIBBFD_DISASM_STYLED "0")
+ 
+ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 	if (LIBBFD_FOUND)
+@@ -106,6 +107,23 @@ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STR
+ 			${LIBBFD_BFD_LIBRARY}
+ 			${LIBBFD_IBERTY_LIBRARY}
+ 		)
++		include(CheckCSourceCompiles)
++		set(CMAKE_REQUIRED_LIBRARIES ${DISASSEMBLER_LIBRARIES})
++		check_c_source_compiles("
++		#define PACKAGE
++		#define PACKAGE_VERSION
++		#include <stdio.h>
++		#include <dis-asm.h>
++
++		int main(int argc, char **argv){
++			struct disassemble_info info;
++			init_disassemble_info(&info, stdout, NULL, NULL);
++			return 0;
++		}
++		" TEST_LIBBFD_DISASM_STYLED)
++		if (TEST_LIBBFD_DISASM_STYLED)
++			set (HAS_LIBBFD_DISASM_STYLED "1")
++		endif (TEST_LIBBFD_DISASM_STYLED)
+ 	endif (LIBBFD_FOUND)
+ endif (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 
+@@ -284,7 +302,7 @@ set (KCOV_SYSTEM_MODE_SRCS
+ 
+ set (KCOV_LIBRARY_PREFIX "/tmp")
+ 
+-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD}")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD} -DKCOV_LIBFD_DISASM_STYLED=${HAS_LIBBFD_DISASM_STYLED}")
+ 
+ include_directories(
+ 	include/
+diff --git a/src/parsers/bfd-disassembler.cc b/src/parsers/bfd-disassembler.cc
+index 43653ee0..28815961 100644
+--- a/src/parsers/bfd-disassembler.cc
++++ b/src/parsers/bfd-disassembler.cc
+@@ -75,7 +75,11 @@ class BfdDisassembler : public IDisassembler
+ 	BfdDisassembler()
+ 	{
+ 		memset(&m_info, 0, sizeof(m_info));
++#if KCOV_LIBFD_DISASM_STYLED
++		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic, BfdDisassembler::opcodesFprintStyledFuncStatic);
++#else
+ 		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic);
++#endif
+ 		m_disassembler = print_insn_i386;
+ 
+ 		m_info.arch = bfd_arch_i386;
+@@ -407,6 +411,25 @@ class BfdDisassembler : public IDisassembler
+ 		return out;
+ 	}
+ 
++#if KCOV_LIBFD_DISASM_STYLED
++	static int opcodesFprintStyledFuncStatic(void *info, enum disassembler_style style, const char *fmt, ...)
++	{
++		(void)style;
++		BfdDisassembler *pThis = (BfdDisassembler *)info;
++		char str[64];
++		int out;
++
++		va_list args;
++		va_start (args, fmt);
++		out = vsnprintf( str, sizeof(str) - 1, fmt, args );
++		va_end (args);
++
++		pThis->opcodesFprintFunc(str);
++
++		return out;
++	}
++#endif
++
+ 	typedef std::map<uint64_t, Section *> SectionCache_t;
+ 	typedef std::unordered_map<uint64_t, Instruction> InstructionAddressMap_t;
+ 	typedef std::map<uint64_t, Instruction *> InstructionOrderedMap_t;

From a22f7f9208bebb16f7d32a002089b40112cebd77 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 4/4] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..b4bdcfb2ec87 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -49,6 +49,7 @@ vopt_conflict debuginfod static
 post_install() {
 	# resolve conflicts with binutils
 	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -r ${DESTDIR}/usr/{include,lib,share/info/ctf-spec.info*}
 }
 
 gdb-common_package() {

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
  2022-09-16 11:09 ` [PR PATCH] [Updated] binutils: update to 2.39 oreo639
@ 2022-09-16 11:17 ` oreo639
  2022-09-16 13:28 ` oreo639
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-16 11:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Most of the testing for this was done as apart of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since it doesn't use `dis-asm.h` afaict)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 17558 bytes --]

From a03b446869c3117c19eb1932cca2bf8dbbb18633 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 1/4] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 1a4e1ca3d594..b04268908c2e 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="q66 <daniel@octaforge.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 88b2a1b50a3e952ace1f9d7740e04ed17270ec15 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 2/4] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 21 ++++--
 4 files changed, 85 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..71895f2073fd 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,9 +83,10 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
@@ -142,7 +150,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From 2124d1876ba49b8aad84231b821085f7d3855b6f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:47:32 -0700
Subject: [PATCH 3/4] kcov: fix build with binutils 2.39

---
 .../0001-Fix-build-with-binutils-2.39.patch   | 97 +++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch

diff --git a/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
new file mode 100644
index 000000000000..5e666aacefc9
--- /dev/null
+++ b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
@@ -0,0 +1,97 @@
+From fd1a4fd2f02cee49afd74e427e38c61b89154582 Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Wed, 14 Sep 2022 16:02:17 -0700
+Subject: [PATCH] Fix build with binutils 2.39
+
+---
+ src/CMakeLists.txt              | 20 +++++++++++++++++++-
+ src/parsers/bfd-disassembler.cc | 23 +++++++++++++++++++++++
+ 2 files changed, 42 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3b751852..fc396827 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -94,6 +94,7 @@ set (DISASSEMBLER_SRCS
+ )
+ 
+ set (HAS_LIBBFD "0")
++set (HAS_LIBBFD_DISASM_STYLED "0")
+ 
+ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 	if (LIBBFD_FOUND)
+@@ -106,6 +107,23 @@ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STR
+ 			${LIBBFD_BFD_LIBRARY}
+ 			${LIBBFD_IBERTY_LIBRARY}
+ 		)
++		include(CheckCSourceCompiles)
++		set(CMAKE_REQUIRED_LIBRARIES ${DISASSEMBLER_LIBRARIES})
++		check_c_source_compiles("
++		#define PACKAGE
++		#define PACKAGE_VERSION
++		#include <stdio.h>
++		#include <dis-asm.h>
++
++		int main(int argc, char **argv){
++			struct disassemble_info info;
++			init_disassemble_info(&info, stdout, NULL, NULL);
++			return 0;
++		}
++		" TEST_LIBBFD_DISASM_STYLED)
++		if (TEST_LIBBFD_DISASM_STYLED)
++			set (HAS_LIBBFD_DISASM_STYLED "1")
++		endif (TEST_LIBBFD_DISASM_STYLED)
+ 	endif (LIBBFD_FOUND)
+ endif (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 
+@@ -284,7 +302,7 @@ set (KCOV_SYSTEM_MODE_SRCS
+ 
+ set (KCOV_LIBRARY_PREFIX "/tmp")
+ 
+-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD}")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD} -DKCOV_LIBFD_DISASM_STYLED=${HAS_LIBBFD_DISASM_STYLED}")
+ 
+ include_directories(
+ 	include/
+diff --git a/src/parsers/bfd-disassembler.cc b/src/parsers/bfd-disassembler.cc
+index 43653ee0..28815961 100644
+--- a/src/parsers/bfd-disassembler.cc
++++ b/src/parsers/bfd-disassembler.cc
+@@ -75,7 +75,11 @@ class BfdDisassembler : public IDisassembler
+ 	BfdDisassembler()
+ 	{
+ 		memset(&m_info, 0, sizeof(m_info));
++#if KCOV_LIBFD_DISASM_STYLED
++		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic, BfdDisassembler::opcodesFprintStyledFuncStatic);
++#else
+ 		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic);
++#endif
+ 		m_disassembler = print_insn_i386;
+ 
+ 		m_info.arch = bfd_arch_i386;
+@@ -407,6 +411,25 @@ class BfdDisassembler : public IDisassembler
+ 		return out;
+ 	}
+ 
++#if KCOV_LIBFD_DISASM_STYLED
++	static int opcodesFprintStyledFuncStatic(void *info, enum disassembler_style style, const char *fmt, ...)
++	{
++		(void)style;
++		BfdDisassembler *pThis = (BfdDisassembler *)info;
++		char str[64];
++		int out;
++
++		va_list args;
++		va_start (args, fmt);
++		out = vsnprintf( str, sizeof(str) - 1, fmt, args );
++		va_end (args);
++
++		pThis->opcodesFprintFunc(str);
++
++		return out;
++	}
++#endif
++
+ 	typedef std::map<uint64_t, Section *> SectionCache_t;
+ 	typedef std::unordered_map<uint64_t, Instruction> InstructionAddressMap_t;
+ 	typedef std::map<uint64_t, Instruction *> InstructionOrderedMap_t;

From 96296ac044809e49d60ee50f65f076c5f1abf4b2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 4/4] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
  2022-09-16 11:09 ` [PR PATCH] [Updated] binutils: update to 2.39 oreo639
  2022-09-16 11:17 ` oreo639
@ 2022-09-16 13:28 ` oreo639
  2022-09-16 17:46 ` dkwo
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-16 13:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Most of the testing for this was done as apart of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since it doesn't use `dis-asm.h` afaict)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 17690 bytes --]

From a03b446869c3117c19eb1932cca2bf8dbbb18633 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 1/4] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 1a4e1ca3d594..b04268908c2e 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="q66 <daniel@octaforge.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 5eea3ea89f7217bf9906b746b1f53676580d6b2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 2/4] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From 4e256ac231f67530a48b7784a1f1595670a75879 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:47:32 -0700
Subject: [PATCH 3/4] kcov: fix build with binutils 2.39

---
 .../0001-Fix-build-with-binutils-2.39.patch   | 97 +++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch

diff --git a/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
new file mode 100644
index 000000000000..5e666aacefc9
--- /dev/null
+++ b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
@@ -0,0 +1,97 @@
+From fd1a4fd2f02cee49afd74e427e38c61b89154582 Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Wed, 14 Sep 2022 16:02:17 -0700
+Subject: [PATCH] Fix build with binutils 2.39
+
+---
+ src/CMakeLists.txt              | 20 +++++++++++++++++++-
+ src/parsers/bfd-disassembler.cc | 23 +++++++++++++++++++++++
+ 2 files changed, 42 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3b751852..fc396827 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -94,6 +94,7 @@ set (DISASSEMBLER_SRCS
+ )
+ 
+ set (HAS_LIBBFD "0")
++set (HAS_LIBBFD_DISASM_STYLED "0")
+ 
+ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 	if (LIBBFD_FOUND)
+@@ -106,6 +107,23 @@ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STR
+ 			${LIBBFD_BFD_LIBRARY}
+ 			${LIBBFD_IBERTY_LIBRARY}
+ 		)
++		include(CheckCSourceCompiles)
++		set(CMAKE_REQUIRED_LIBRARIES ${DISASSEMBLER_LIBRARIES})
++		check_c_source_compiles("
++		#define PACKAGE
++		#define PACKAGE_VERSION
++		#include <stdio.h>
++		#include <dis-asm.h>
++
++		int main(int argc, char **argv){
++			struct disassemble_info info;
++			init_disassemble_info(&info, stdout, NULL, NULL);
++			return 0;
++		}
++		" TEST_LIBBFD_DISASM_STYLED)
++		if (TEST_LIBBFD_DISASM_STYLED)
++			set (HAS_LIBBFD_DISASM_STYLED "1")
++		endif (TEST_LIBBFD_DISASM_STYLED)
+ 	endif (LIBBFD_FOUND)
+ endif (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 
+@@ -284,7 +302,7 @@ set (KCOV_SYSTEM_MODE_SRCS
+ 
+ set (KCOV_LIBRARY_PREFIX "/tmp")
+ 
+-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD}")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD} -DKCOV_LIBFD_DISASM_STYLED=${HAS_LIBBFD_DISASM_STYLED}")
+ 
+ include_directories(
+ 	include/
+diff --git a/src/parsers/bfd-disassembler.cc b/src/parsers/bfd-disassembler.cc
+index 43653ee0..28815961 100644
+--- a/src/parsers/bfd-disassembler.cc
++++ b/src/parsers/bfd-disassembler.cc
+@@ -75,7 +75,11 @@ class BfdDisassembler : public IDisassembler
+ 	BfdDisassembler()
+ 	{
+ 		memset(&m_info, 0, sizeof(m_info));
++#if KCOV_LIBFD_DISASM_STYLED
++		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic, BfdDisassembler::opcodesFprintStyledFuncStatic);
++#else
+ 		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic);
++#endif
+ 		m_disassembler = print_insn_i386;
+ 
+ 		m_info.arch = bfd_arch_i386;
+@@ -407,6 +411,25 @@ class BfdDisassembler : public IDisassembler
+ 		return out;
+ 	}
+ 
++#if KCOV_LIBFD_DISASM_STYLED
++	static int opcodesFprintStyledFuncStatic(void *info, enum disassembler_style style, const char *fmt, ...)
++	{
++		(void)style;
++		BfdDisassembler *pThis = (BfdDisassembler *)info;
++		char str[64];
++		int out;
++
++		va_list args;
++		va_start (args, fmt);
++		out = vsnprintf( str, sizeof(str) - 1, fmt, args );
++		va_end (args);
++
++		pThis->opcodesFprintFunc(str);
++
++		return out;
++	}
++#endif
++
+ 	typedef std::map<uint64_t, Section *> SectionCache_t;
+ 	typedef std::unordered_map<uint64_t, Instruction> InstructionAddressMap_t;
+ 	typedef std::map<uint64_t, Instruction *> InstructionOrderedMap_t;

From aa2562ceca976d9b7582a773c0fe9969c8840f94 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 4/4] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (2 preceding siblings ...)
  2022-09-16 13:28 ` oreo639
@ 2022-09-16 17:46 ` dkwo
  2022-09-16 22:44 ` oreo639
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2022-09-16 17:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/39312#issuecomment-1249638918

Comment:
Does it make sense to include here also the `cross-*` commits from the gcc PR, with just the updated binutils part?

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (3 preceding siblings ...)
  2022-09-16 17:46 ` dkwo
@ 2022-09-16 22:44 ` oreo639
  2022-09-17  4:09 ` [PR PATCH] [Updated] " oreo639
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-16 22:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 280 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/39312#issuecomment-1249917952

Comment:
> Does it make sense to include here also the cross-* commits from the gcc PR, with just the updated binutils part?

Good point. Thanks.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (4 preceding siblings ...)
  2022-09-16 22:44 ` oreo639
@ 2022-09-17  4:09 ` oreo639
  2022-09-17  4:11 ` oreo639
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-17  4:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since it doesn't use `dis-asm.h` afaict)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 67086 bytes --]

From a03b446869c3117c19eb1932cca2bf8dbbb18633 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/29] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 1a4e1ca3d594..b04268908c2e 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="q66 <daniel@octaforge.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 5eea3ea89f7217bf9906b746b1f53676580d6b2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/29] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From 4e256ac231f67530a48b7784a1f1595670a75879 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:47:32 -0700
Subject: [PATCH 03/29] kcov: fix build with binutils 2.39

---
 .../0001-Fix-build-with-binutils-2.39.patch   | 97 +++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch

diff --git a/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
new file mode 100644
index 000000000000..5e666aacefc9
--- /dev/null
+++ b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
@@ -0,0 +1,97 @@
+From fd1a4fd2f02cee49afd74e427e38c61b89154582 Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Wed, 14 Sep 2022 16:02:17 -0700
+Subject: [PATCH] Fix build with binutils 2.39
+
+---
+ src/CMakeLists.txt              | 20 +++++++++++++++++++-
+ src/parsers/bfd-disassembler.cc | 23 +++++++++++++++++++++++
+ 2 files changed, 42 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3b751852..fc396827 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -94,6 +94,7 @@ set (DISASSEMBLER_SRCS
+ )
+ 
+ set (HAS_LIBBFD "0")
++set (HAS_LIBBFD_DISASM_STYLED "0")
+ 
+ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 	if (LIBBFD_FOUND)
+@@ -106,6 +107,23 @@ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STR
+ 			${LIBBFD_BFD_LIBRARY}
+ 			${LIBBFD_IBERTY_LIBRARY}
+ 		)
++		include(CheckCSourceCompiles)
++		set(CMAKE_REQUIRED_LIBRARIES ${DISASSEMBLER_LIBRARIES})
++		check_c_source_compiles("
++		#define PACKAGE
++		#define PACKAGE_VERSION
++		#include <stdio.h>
++		#include <dis-asm.h>
++
++		int main(int argc, char **argv){
++			struct disassemble_info info;
++			init_disassemble_info(&info, stdout, NULL, NULL);
++			return 0;
++		}
++		" TEST_LIBBFD_DISASM_STYLED)
++		if (TEST_LIBBFD_DISASM_STYLED)
++			set (HAS_LIBBFD_DISASM_STYLED "1")
++		endif (TEST_LIBBFD_DISASM_STYLED)
+ 	endif (LIBBFD_FOUND)
+ endif (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 
+@@ -284,7 +302,7 @@ set (KCOV_SYSTEM_MODE_SRCS
+ 
+ set (KCOV_LIBRARY_PREFIX "/tmp")
+ 
+-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD}")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD} -DKCOV_LIBFD_DISASM_STYLED=${HAS_LIBBFD_DISASM_STYLED}")
+ 
+ include_directories(
+ 	include/
+diff --git a/src/parsers/bfd-disassembler.cc b/src/parsers/bfd-disassembler.cc
+index 43653ee0..28815961 100644
+--- a/src/parsers/bfd-disassembler.cc
++++ b/src/parsers/bfd-disassembler.cc
+@@ -75,7 +75,11 @@ class BfdDisassembler : public IDisassembler
+ 	BfdDisassembler()
+ 	{
+ 		memset(&m_info, 0, sizeof(m_info));
++#if KCOV_LIBFD_DISASM_STYLED
++		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic, BfdDisassembler::opcodesFprintStyledFuncStatic);
++#else
+ 		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic);
++#endif
+ 		m_disassembler = print_insn_i386;
+ 
+ 		m_info.arch = bfd_arch_i386;
+@@ -407,6 +411,25 @@ class BfdDisassembler : public IDisassembler
+ 		return out;
+ 	}
+ 
++#if KCOV_LIBFD_DISASM_STYLED
++	static int opcodesFprintStyledFuncStatic(void *info, enum disassembler_style style, const char *fmt, ...)
++	{
++		(void)style;
++		BfdDisassembler *pThis = (BfdDisassembler *)info;
++		char str[64];
++		int out;
++
++		va_list args;
++		va_start (args, fmt);
++		out = vsnprintf( str, sizeof(str) - 1, fmt, args );
++		va_end (args);
++
++		pThis->opcodesFprintFunc(str);
++
++		return out;
++	}
++#endif
++
+ 	typedef std::map<uint64_t, Section *> SectionCache_t;
+ 	typedef std::unordered_map<uint64_t, Instruction> InstructionAddressMap_t;
+ 	typedef std::map<uint64_t, Instruction *> InstructionOrderedMap_t;

From aa2562ceca976d9b7582a773c0fe9969c8840f94 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 04/29] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From 193187a349c071101062c2b3501134f8f91eaf8f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 05/29] build-style/void-cross: Update to binutils 2.39

Centralize versions and distfiles for void-cross.
---
 common/build-style/void-cross.sh             |  6 ++++
 common/environment/build-style/void-cross.sh | 34 ++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*
diff --git a/common/environment/build-style/void-cross.sh b/common/environment/build-style/void-cross.sh
index 62ce9eaa2e4a..2484aeed7088 100644
--- a/common/environment/build-style/void-cross.sh
+++ b/common/environment/build-style/void-cross.sh
@@ -1,6 +1,40 @@
+_void_cross_setup_distfiles() {
+	local tgt=${sourcepkg/cross-}
+
+	local _binutils_version=2.39
+	local _gcc_version=10.2.1_pre1
+	local _glibc_version=2.32
+	local _musl_version=1.1.24
+	local _libucontext_version=1.0
+	local _linux_version=5.10.4
+
+	distfiles+=" ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
+	 https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz"
+	checksum+=" 645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
+	 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590"
+	case "$tgt" in
+		*-gnu*)
+			distfiles+=" ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz"
+			checksum+=" 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836"
+			;;
+		*-musl*)
+			distfiles+=" https://musl.libc.org/releases/musl-${_musl_version}.tar.gz"
+			checksum+=" 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3"
+			if [ -z "$cross_gcc_skip_go" ];then
+				distfiles+=" https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
+				checksum+=" 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+			fi
+			;;
+		*)  msg_error "Unknown libc for ${tgt}\n" ;;
+	esac
+	distfiles+=" ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
+	checksum+=" 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+}
+
 lib32disabled=yes
 nopie=yes
 create_wrksrc=yes
 
 nostrip_files+=" libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
  libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a libgmem.a"
+_void_cross_setup_distfiles

From 29b946df54c00fb2b0c18a908f70a73a7929d4ad Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:41 -0700
Subject: [PATCH 06/29] cross-aarch64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-aarch64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..62a1bcf4de6e 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-O2 -march=armv8-a"

From 477a8bd935266e96cdc1ba60ae06d1d8e3c2246b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 07/29] cross-aarch64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-aarch64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..1a27eb524106 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-O2 -march=armv8-a"

From 30f321af2dfeee373d5db464a9582a7589fea4fa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 08/29] cross-arm-linux-gnueabi: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabi/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..1ef3010dc050 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--without-fp"

From e463a73315cb64cb514bd1ef5d4ed819e5cb3a6d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 09/29] cross-arm-linux-gnueabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..c35181bf64ad 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-Os -march=armv6 -mfpu=vfp -mfloat-abi=hard"

From 44669d6df4fa5c54e3008b69e5c92031ddfbe302 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 10/29] cross-arm-linux-musleabi: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabi/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..bc063dc3a74e 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--without-fp"

From 09af5e07a37d821a47fc2ee5ef9d3468eb4cb8e3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 11/29] cross-arm-linux-musleabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabihf/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..9c04be4c982a 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-Os -march=armv6 -mfpu=vfp -mfloat-abi=hard"

From fe7e56364e70e4549fe70c51a99811645d3d88e7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 12/29] cross-armv7l-linux-gnueabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..3e470c0d219e 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-O2 -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard"

From d8cd48ad4e03be35299b389c842d93e22ded8b75 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 13/29] cross-armv7l-linux-musleabihf: rebuild for binutils
 2.39

---
 .../cross-armv7l-linux-musleabihf/template    | 20 ++-----------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..5eaf57e7037c 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-O2 -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard"

From ae2837bc66280d6de4e1a83506a657dd11069a42 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 14/29] cross-i686-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-i686-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..ad9592e7fa26 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,31 +1,15 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 # explicitly enable for final gcc, as gfortran does not build without on x86

From 4e56476b21e86e82cb44cbe73c80b95c9248bae8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 15/29] cross-i686-pc-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..076dadf856fe 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
@@ -14,15 +10,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 # explicitly enable for final gcc, as gfortran does not build without on x86

From a599c6594f69fd325de0a4e7de0c72658de9ea18 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 16/29] cross-mips-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-mips-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..1485ffb0db6a 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 9218a7d2cfe083219263049735fa6c35e8da0b2c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 17/29] cross-mips-linux-muslhf: rebuild for binutils 2.39

---
 srcpkgs/cross-mips-linux-muslhf/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..f82d85239e9e 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="hipperson0 <hipperson0@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 38dc0ca94ebdc4fa3d35f06f6ef7eaf8d60fe270 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 18/29] cross-mipsel-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-mipsel-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..75a11c9b9702 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 843ebfbb7d4aabca481b7b53536826c298be6941 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 19/29] cross-mipsel-linux-muslhf: rebuild for binutils 2.39

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..766f1911ebf0 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From d1ede84d202ee23c279a3b9079eb46247290883a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 20/29] cross-powerpc-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..804f67a4a9d5 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 6db87c2a01200704d7491050e2fbca96aaefbf66 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 21/29] cross-powerpc-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..7513928eb5b3 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 22a935d8ce17111c78ffaf815603f7a936236839 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 22/29] cross-powerpc64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..a6e782d78aa6 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"
@@ -16,15 +12,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From f95ba9b4fc18a47183876419300b29c34675ae3b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 23/29] cross-powerpc64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 1ebd0fb2048d..a658d4582578 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"
@@ -15,19 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 2f4e42e0079d2e965262a2129fcf4d402c93326e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 24/29] cross-powerpc64le-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 733f5851da5c..e8458b770e32 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"
@@ -16,15 +12,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 2263da326c28a5c91c6f4ccb5d3a1b6ed1d75468 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 25/29] cross-powerpc64le-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 20 ++-----------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index 76a70aa1d6db..367dfad2a920 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"
@@ -15,19 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 7d2a4f53e42cd6ce39b6ef4cee785e07b6c364cd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 26/29] cross-powerpcle-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 347b8fcf4f55..950fa1a3e62f 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 23eb3c5ac36f6e0a93d60a8e7839f3a61e103c28 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 27/29] cross-powerpcle-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index ec9324ddaa99..e57a2cfe4e12 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 17c042c00ac50c6d85ce82b8f9a602e1f721231b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 28/29] cross-x86_64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-x86_64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 0078fbe7224b..cc0e5744d648 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
@@ -14,15 +10,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 # explicitly enable for final gcc, gfortran does not build without on x86

From 5512f538c7c7cec0dade9e9f0cc5c2a00bc1e160 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 29/29] cross-x86_64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-x86_64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..6d8812bb21bd 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,31 +1,15 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 # explicitly enable for final gcc, gfortran does not build without on x86

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (5 preceding siblings ...)
  2022-09-17  4:09 ` [PR PATCH] [Updated] " oreo639
@ 2022-09-17  4:11 ` oreo639
  2022-09-17  4:36 ` oreo639
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-17  4:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since it doesn't use `dis-asm.h` afaict)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 67098 bytes --]

From a03b446869c3117c19eb1932cca2bf8dbbb18633 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/29] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 1a4e1ca3d594..b04268908c2e 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="q66 <daniel@octaforge.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 5eea3ea89f7217bf9906b746b1f53676580d6b2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/29] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From 4e256ac231f67530a48b7784a1f1595670a75879 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:47:32 -0700
Subject: [PATCH 03/29] kcov: fix build with binutils 2.39

---
 .../0001-Fix-build-with-binutils-2.39.patch   | 97 +++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch

diff --git a/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
new file mode 100644
index 000000000000..5e666aacefc9
--- /dev/null
+++ b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
@@ -0,0 +1,97 @@
+From fd1a4fd2f02cee49afd74e427e38c61b89154582 Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Wed, 14 Sep 2022 16:02:17 -0700
+Subject: [PATCH] Fix build with binutils 2.39
+
+---
+ src/CMakeLists.txt              | 20 +++++++++++++++++++-
+ src/parsers/bfd-disassembler.cc | 23 +++++++++++++++++++++++
+ 2 files changed, 42 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3b751852..fc396827 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -94,6 +94,7 @@ set (DISASSEMBLER_SRCS
+ )
+ 
+ set (HAS_LIBBFD "0")
++set (HAS_LIBBFD_DISASM_STYLED "0")
+ 
+ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 	if (LIBBFD_FOUND)
+@@ -106,6 +107,23 @@ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STR
+ 			${LIBBFD_BFD_LIBRARY}
+ 			${LIBBFD_IBERTY_LIBRARY}
+ 		)
++		include(CheckCSourceCompiles)
++		set(CMAKE_REQUIRED_LIBRARIES ${DISASSEMBLER_LIBRARIES})
++		check_c_source_compiles("
++		#define PACKAGE
++		#define PACKAGE_VERSION
++		#include <stdio.h>
++		#include <dis-asm.h>
++
++		int main(int argc, char **argv){
++			struct disassemble_info info;
++			init_disassemble_info(&info, stdout, NULL, NULL);
++			return 0;
++		}
++		" TEST_LIBBFD_DISASM_STYLED)
++		if (TEST_LIBBFD_DISASM_STYLED)
++			set (HAS_LIBBFD_DISASM_STYLED "1")
++		endif (TEST_LIBBFD_DISASM_STYLED)
+ 	endif (LIBBFD_FOUND)
+ endif (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 
+@@ -284,7 +302,7 @@ set (KCOV_SYSTEM_MODE_SRCS
+ 
+ set (KCOV_LIBRARY_PREFIX "/tmp")
+ 
+-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD}")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD} -DKCOV_LIBFD_DISASM_STYLED=${HAS_LIBBFD_DISASM_STYLED}")
+ 
+ include_directories(
+ 	include/
+diff --git a/src/parsers/bfd-disassembler.cc b/src/parsers/bfd-disassembler.cc
+index 43653ee0..28815961 100644
+--- a/src/parsers/bfd-disassembler.cc
++++ b/src/parsers/bfd-disassembler.cc
+@@ -75,7 +75,11 @@ class BfdDisassembler : public IDisassembler
+ 	BfdDisassembler()
+ 	{
+ 		memset(&m_info, 0, sizeof(m_info));
++#if KCOV_LIBFD_DISASM_STYLED
++		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic, BfdDisassembler::opcodesFprintStyledFuncStatic);
++#else
+ 		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic);
++#endif
+ 		m_disassembler = print_insn_i386;
+ 
+ 		m_info.arch = bfd_arch_i386;
+@@ -407,6 +411,25 @@ class BfdDisassembler : public IDisassembler
+ 		return out;
+ 	}
+ 
++#if KCOV_LIBFD_DISASM_STYLED
++	static int opcodesFprintStyledFuncStatic(void *info, enum disassembler_style style, const char *fmt, ...)
++	{
++		(void)style;
++		BfdDisassembler *pThis = (BfdDisassembler *)info;
++		char str[64];
++		int out;
++
++		va_list args;
++		va_start (args, fmt);
++		out = vsnprintf( str, sizeof(str) - 1, fmt, args );
++		va_end (args);
++
++		pThis->opcodesFprintFunc(str);
++
++		return out;
++	}
++#endif
++
+ 	typedef std::map<uint64_t, Section *> SectionCache_t;
+ 	typedef std::unordered_map<uint64_t, Instruction> InstructionAddressMap_t;
+ 	typedef std::map<uint64_t, Instruction *> InstructionOrderedMap_t;

From aa2562ceca976d9b7582a773c0fe9969c8840f94 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 04/29] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From e349d5b2d151762343aa9ec940d53e6ab576c464 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 05/29] build-style/void-cross: Update to binutils 2.39

Centralize versions and distfiles for void-cross.
---
 common/build-style/void-cross.sh             |  6 ++++
 common/environment/build-style/void-cross.sh | 34 ++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*
diff --git a/common/environment/build-style/void-cross.sh b/common/environment/build-style/void-cross.sh
index 62ce9eaa2e4a..a1ca993d3002 100644
--- a/common/environment/build-style/void-cross.sh
+++ b/common/environment/build-style/void-cross.sh
@@ -1,6 +1,40 @@
+_void_cross_setup_distfiles() {
+	local tgt=${sourcepkg/cross-}
+
+	local _binutils_version=2.39
+	local _gcc_version=10.2.1_pre1
+	local _glibc_version=2.32
+	local _musl_version=1.1.24
+	local _libucontext_version=1.0
+	local _linux_version=5.10.4
+
+	distfiles+=" ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
+	 https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz"
+	checksum+=" 645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
+	 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590"
+	case "$tgt" in
+		*-gnu*)
+			distfiles+=" ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz"
+			checksum+=" 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836"
+			;;
+		*-musl*)
+			distfiles+=" https://musl.libc.org/releases/musl-${_musl_version}.tar.gz"
+			checksum+=" 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3"
+			if [ -z "$cross_gcc_skip_go" ];then
+				distfiles+=" https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
+				checksum+=" 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+			fi
+			;;
+		*)  msg_error "Could not determine libc for ${tgt}\n" ;;
+	esac
+	distfiles+=" ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
+	checksum+=" 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+}
+
 lib32disabled=yes
 nopie=yes
 create_wrksrc=yes
 
 nostrip_files+=" libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
  libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a libgmem.a"
+_void_cross_setup_distfiles

From 860ab06c67b26654ad258a442402ccbaadc59a89 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:41 -0700
Subject: [PATCH 06/29] cross-aarch64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-aarch64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..62a1bcf4de6e 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-O2 -march=armv8-a"

From 004cd509a2e644de80eef026480cfac1d30efc8d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 07/29] cross-aarch64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-aarch64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..1a27eb524106 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-O2 -march=armv8-a"

From 2ffcd71b109a712da0973210dbad73c3bacbbe45 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 08/29] cross-arm-linux-gnueabi: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabi/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..1ef3010dc050 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--without-fp"

From 7ad3c8cb7761ccc0d7c4e81f0f4b749748825f30 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 09/29] cross-arm-linux-gnueabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..c35181bf64ad 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-Os -march=armv6 -mfpu=vfp -mfloat-abi=hard"

From aaf00a994b854f73b4288a6524180ac0506c70df Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 10/29] cross-arm-linux-musleabi: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabi/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..bc063dc3a74e 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--without-fp"

From f5be41ff7e14267be093de638281b99ea8ca4048 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 11/29] cross-arm-linux-musleabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabihf/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..9c04be4c982a 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-Os -march=armv6 -mfpu=vfp -mfloat-abi=hard"

From aa8a464e323c85023037a98c2b9be04a74165979 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 12/29] cross-armv7l-linux-gnueabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..3e470c0d219e 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-O2 -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard"

From f26dc178a501ac332710e226e30a531a95460ca3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 13/29] cross-armv7l-linux-musleabihf: rebuild for binutils
 2.39

---
 .../cross-armv7l-linux-musleabihf/template    | 20 ++-----------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..5eaf57e7037c 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-O2 -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard"

From 2cbc32ee0b33edd133d4e058225d1e5b6263d3c0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 14/29] cross-i686-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-i686-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..ad9592e7fa26 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,31 +1,15 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 # explicitly enable for final gcc, as gfortran does not build without on x86

From 1630b9d5e064fffafa6b0c30cd36949a7417b631 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 15/29] cross-i686-pc-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..076dadf856fe 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
@@ -14,15 +10,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 # explicitly enable for final gcc, as gfortran does not build without on x86

From 31975fc78dfc21dc8936357abdc10ae57a1500f0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 16/29] cross-mips-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-mips-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..1485ffb0db6a 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 25300374ba663fb48f1fd7af3d5846d0509bb53c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 17/29] cross-mips-linux-muslhf: rebuild for binutils 2.39

---
 srcpkgs/cross-mips-linux-muslhf/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..f82d85239e9e 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="hipperson0 <hipperson0@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 8767e743c8e384101069b93b3cf8274f848cadc7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 18/29] cross-mipsel-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-mipsel-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..75a11c9b9702 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 79f6ff821b7e0168d8d356c1513de3d158ac04b0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 19/29] cross-mipsel-linux-muslhf: rebuild for binutils 2.39

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..766f1911ebf0 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From f99fa98fab49e56907b6325b09909a34ea6a9664 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 20/29] cross-powerpc-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..804f67a4a9d5 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 90d12679dc1ad069d5ae052c2d4ecd089b1cd7ac Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 21/29] cross-powerpc-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..7513928eb5b3 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From fba507b07c488b9ea770a2a6caed3028cba3d604 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 22/29] cross-powerpc64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..a6e782d78aa6 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"
@@ -16,15 +12,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 92942bba851f2a79b50c232c9357598345b1c1e2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 23/29] cross-powerpc64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 1ebd0fb2048d..a658d4582578 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"
@@ -15,19 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 237963eb6b2f45281876db7f353ac86e533b4dab Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 24/29] cross-powerpc64le-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 733f5851da5c..e8458b770e32 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"
@@ -16,15 +12,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 5edf181864960f1cc57d37d0df06c6e31df66e79 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 25/29] cross-powerpc64le-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 20 ++-----------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index 76a70aa1d6db..367dfad2a920 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"
@@ -15,19 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From f73dc53d41d927ad99c06ccaacac172c9778da5d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 26/29] cross-powerpcle-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 347b8fcf4f55..950fa1a3e62f 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_gcc_skip_go=yes

From e4426769e5a982a795dc7f65e377e5d6d1907fe2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 27/29] cross-powerpcle-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index ec9324ddaa99..e57a2cfe4e12 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 1314f0636b2458e2489d97aef5e78b115ec1dceb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 28/29] cross-x86_64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-x86_64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 0078fbe7224b..cc0e5744d648 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
@@ -14,15 +10,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 # explicitly enable for final gcc, gfortran does not build without on x86

From 028e16af2c191c93462444d8da8b53c0c3eff94c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 29/29] cross-x86_64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-x86_64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..6d8812bb21bd 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,31 +1,15 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 # explicitly enable for final gcc, gfortran does not build without on x86

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (6 preceding siblings ...)
  2022-09-17  4:11 ` oreo639
@ 2022-09-17  4:36 ` oreo639
  2022-09-17  5:09 ` oreo639
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-17  4:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since it doesn't use `dis-asm.h` afaict)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 67099 bytes --]

From a03b446869c3117c19eb1932cca2bf8dbbb18633 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/29] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 1a4e1ca3d594..b04268908c2e 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="q66 <daniel@octaforge.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 5eea3ea89f7217bf9906b746b1f53676580d6b2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/29] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From 4e256ac231f67530a48b7784a1f1595670a75879 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:47:32 -0700
Subject: [PATCH 03/29] kcov: fix build with binutils 2.39

---
 .../0001-Fix-build-with-binutils-2.39.patch   | 97 +++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch

diff --git a/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
new file mode 100644
index 000000000000..5e666aacefc9
--- /dev/null
+++ b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
@@ -0,0 +1,97 @@
+From fd1a4fd2f02cee49afd74e427e38c61b89154582 Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Wed, 14 Sep 2022 16:02:17 -0700
+Subject: [PATCH] Fix build with binutils 2.39
+
+---
+ src/CMakeLists.txt              | 20 +++++++++++++++++++-
+ src/parsers/bfd-disassembler.cc | 23 +++++++++++++++++++++++
+ 2 files changed, 42 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3b751852..fc396827 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -94,6 +94,7 @@ set (DISASSEMBLER_SRCS
+ )
+ 
+ set (HAS_LIBBFD "0")
++set (HAS_LIBBFD_DISASM_STYLED "0")
+ 
+ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 	if (LIBBFD_FOUND)
+@@ -106,6 +107,23 @@ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STR
+ 			${LIBBFD_BFD_LIBRARY}
+ 			${LIBBFD_IBERTY_LIBRARY}
+ 		)
++		include(CheckCSourceCompiles)
++		set(CMAKE_REQUIRED_LIBRARIES ${DISASSEMBLER_LIBRARIES})
++		check_c_source_compiles("
++		#define PACKAGE
++		#define PACKAGE_VERSION
++		#include <stdio.h>
++		#include <dis-asm.h>
++
++		int main(int argc, char **argv){
++			struct disassemble_info info;
++			init_disassemble_info(&info, stdout, NULL, NULL);
++			return 0;
++		}
++		" TEST_LIBBFD_DISASM_STYLED)
++		if (TEST_LIBBFD_DISASM_STYLED)
++			set (HAS_LIBBFD_DISASM_STYLED "1")
++		endif (TEST_LIBBFD_DISASM_STYLED)
+ 	endif (LIBBFD_FOUND)
+ endif (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 
+@@ -284,7 +302,7 @@ set (KCOV_SYSTEM_MODE_SRCS
+ 
+ set (KCOV_LIBRARY_PREFIX "/tmp")
+ 
+-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD}")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD} -DKCOV_LIBFD_DISASM_STYLED=${HAS_LIBBFD_DISASM_STYLED}")
+ 
+ include_directories(
+ 	include/
+diff --git a/src/parsers/bfd-disassembler.cc b/src/parsers/bfd-disassembler.cc
+index 43653ee0..28815961 100644
+--- a/src/parsers/bfd-disassembler.cc
++++ b/src/parsers/bfd-disassembler.cc
+@@ -75,7 +75,11 @@ class BfdDisassembler : public IDisassembler
+ 	BfdDisassembler()
+ 	{
+ 		memset(&m_info, 0, sizeof(m_info));
++#if KCOV_LIBFD_DISASM_STYLED
++		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic, BfdDisassembler::opcodesFprintStyledFuncStatic);
++#else
+ 		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic);
++#endif
+ 		m_disassembler = print_insn_i386;
+ 
+ 		m_info.arch = bfd_arch_i386;
+@@ -407,6 +411,25 @@ class BfdDisassembler : public IDisassembler
+ 		return out;
+ 	}
+ 
++#if KCOV_LIBFD_DISASM_STYLED
++	static int opcodesFprintStyledFuncStatic(void *info, enum disassembler_style style, const char *fmt, ...)
++	{
++		(void)style;
++		BfdDisassembler *pThis = (BfdDisassembler *)info;
++		char str[64];
++		int out;
++
++		va_list args;
++		va_start (args, fmt);
++		out = vsnprintf( str, sizeof(str) - 1, fmt, args );
++		va_end (args);
++
++		pThis->opcodesFprintFunc(str);
++
++		return out;
++	}
++#endif
++
+ 	typedef std::map<uint64_t, Section *> SectionCache_t;
+ 	typedef std::unordered_map<uint64_t, Instruction> InstructionAddressMap_t;
+ 	typedef std::map<uint64_t, Instruction *> InstructionOrderedMap_t;

From aa2562ceca976d9b7582a773c0fe9969c8840f94 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 04/29] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From ab03a27789d1c2c56eef27688b9bd607ad9ac9e6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 05/29] build-style/void-cross: update to binutils 2.39.

Centralize versions and distfiles for void-cross.
---
 common/build-style/void-cross.sh             |  6 ++++
 common/environment/build-style/void-cross.sh | 34 ++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*
diff --git a/common/environment/build-style/void-cross.sh b/common/environment/build-style/void-cross.sh
index 62ce9eaa2e4a..a1ca993d3002 100644
--- a/common/environment/build-style/void-cross.sh
+++ b/common/environment/build-style/void-cross.sh
@@ -1,6 +1,40 @@
+_void_cross_setup_distfiles() {
+	local tgt=${sourcepkg/cross-}
+
+	local _binutils_version=2.39
+	local _gcc_version=10.2.1_pre1
+	local _glibc_version=2.32
+	local _musl_version=1.1.24
+	local _libucontext_version=1.0
+	local _linux_version=5.10.4
+
+	distfiles+=" ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
+	 https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz"
+	checksum+=" 645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
+	 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590"
+	case "$tgt" in
+		*-gnu*)
+			distfiles+=" ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz"
+			checksum+=" 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836"
+			;;
+		*-musl*)
+			distfiles+=" https://musl.libc.org/releases/musl-${_musl_version}.tar.gz"
+			checksum+=" 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3"
+			if [ -z "$cross_gcc_skip_go" ];then
+				distfiles+=" https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
+				checksum+=" 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+			fi
+			;;
+		*)  msg_error "Could not determine libc for ${tgt}\n" ;;
+	esac
+	distfiles+=" ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
+	checksum+=" 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+}
+
 lib32disabled=yes
 nopie=yes
 create_wrksrc=yes
 
 nostrip_files+=" libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
  libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a libgmem.a"
+_void_cross_setup_distfiles

From 0ca5414210a87b8cf11b7d510cb17d66ebd4428a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:41 -0700
Subject: [PATCH 06/29] cross-aarch64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-aarch64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..62a1bcf4de6e 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-O2 -march=armv8-a"

From e0c9292b3490589e07720ec50ed1a632c6a0d179 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 07/29] cross-aarch64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-aarch64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..1a27eb524106 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-O2 -march=armv8-a"

From eb9a2d85fb16a9268119774b898e3cd3c9f170af Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 08/29] cross-arm-linux-gnueabi: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabi/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..1ef3010dc050 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--without-fp"

From 77582ef57fef4958abb3b2bf74561ff4c4a9b332 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 09/29] cross-arm-linux-gnueabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..c35181bf64ad 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-Os -march=armv6 -mfpu=vfp -mfloat-abi=hard"

From 81ebdb6ddc3be0c0a8f59d916afe68c753ee025e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 10/29] cross-arm-linux-musleabi: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabi/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..bc063dc3a74e 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--without-fp"

From 17c9f4b24db197adcd4b00b4fb5ad24822c53883 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 11/29] cross-arm-linux-musleabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabihf/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..9c04be4c982a 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-Os -march=armv6 -mfpu=vfp -mfloat-abi=hard"

From 8bdaf0f6027111977739efb1cc1d80d060ec18f7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 12/29] cross-armv7l-linux-gnueabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..3e470c0d219e 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-O2 -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard"

From 3f23508e1ecb6340da519f43e214619d5a96f5c3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 13/29] cross-armv7l-linux-musleabihf: rebuild for binutils
 2.39

---
 .../cross-armv7l-linux-musleabihf/template    | 20 ++-----------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..5eaf57e7037c 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-O2 -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard"

From 10534e4cb50984f11275ff1fe5c848d2c5e84260 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 14/29] cross-i686-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-i686-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..ad9592e7fa26 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,31 +1,15 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 # explicitly enable for final gcc, as gfortran does not build without on x86

From f4de562fcb982073cbbe9498f1a4a839fa0823d3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 15/29] cross-i686-pc-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..076dadf856fe 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
@@ -14,15 +10,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 # explicitly enable for final gcc, as gfortran does not build without on x86

From c22367abbe910227a860521b9d914f54f99f19c3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 16/29] cross-mips-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-mips-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..1485ffb0db6a 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 66b30eac81d3b1817a62fc7305b6f5ed53284700 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 17/29] cross-mips-linux-muslhf: rebuild for binutils 2.39

---
 srcpkgs/cross-mips-linux-muslhf/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..f82d85239e9e 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="hipperson0 <hipperson0@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From d204af7943225bb03f74d4e1003f3d8acd7d038d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 18/29] cross-mipsel-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-mipsel-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..75a11c9b9702 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From a6064789432f1beebcec10177c2271718739609a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 19/29] cross-mipsel-linux-muslhf: rebuild for binutils 2.39

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..766f1911ebf0 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 9c43c92e78df42fc7969cd947d21c39c9ec0327e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 20/29] cross-powerpc-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..804f67a4a9d5 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 816eb57c9dd4731b4f319faf8b22daf4ded03060 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 21/29] cross-powerpc-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..7513928eb5b3 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From d0c685db5a1429760ead8b64a507499954357fa6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 22/29] cross-powerpc64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..a6e782d78aa6 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"
@@ -16,15 +12,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 853f643f321db523132fec5aa480faddcda54c50 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 23/29] cross-powerpc64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 1ebd0fb2048d..a658d4582578 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"
@@ -15,19 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 8405794fe2790f7c7edeab14ecac8c8ff636719d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 24/29] cross-powerpc64le-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 733f5851da5c..e8458b770e32 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"
@@ -16,15 +12,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 93499854b35e83e194f4fd9e82abce4782e9ee5e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 25/29] cross-powerpc64le-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 20 ++-----------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index 76a70aa1d6db..367dfad2a920 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"
@@ -15,19 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 50bdd19781b50341f21dc20da554c66e99546ddd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 26/29] cross-powerpcle-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 347b8fcf4f55..950fa1a3e62f 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 00bfbc82460a45a11fcf8e7bc5449759957b895d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 27/29] cross-powerpcle-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index ec9324ddaa99..e57a2cfe4e12 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 323dbca3ecf8bf4294ea92bbf78c293a5515ae5d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 28/29] cross-x86_64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-x86_64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 0078fbe7224b..cc0e5744d648 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
@@ -14,15 +10,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 # explicitly enable for final gcc, gfortran does not build without on x86

From 07bfd722b4e9adb7b1a1e63f2f54a16c66cd3506 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 29/29] cross-x86_64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-x86_64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..6d8812bb21bd 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,31 +1,15 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 # explicitly enable for final gcc, gfortran does not build without on x86

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (7 preceding siblings ...)
  2022-09-17  4:36 ` oreo639
@ 2022-09-17  5:09 ` oreo639
  2022-09-17 11:44 ` dkwo
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-17  5:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since it doesn't use `dis-asm.h` afaict)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 67100 bytes --]

From a03b446869c3117c19eb1932cca2bf8dbbb18633 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/29] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 1a4e1ca3d594..b04268908c2e 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="q66 <daniel@octaforge.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 5eea3ea89f7217bf9906b746b1f53676580d6b2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/29] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From 4e256ac231f67530a48b7784a1f1595670a75879 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:47:32 -0700
Subject: [PATCH 03/29] kcov: fix build with binutils 2.39

---
 .../0001-Fix-build-with-binutils-2.39.patch   | 97 +++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch

diff --git a/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
new file mode 100644
index 000000000000..5e666aacefc9
--- /dev/null
+++ b/srcpkgs/kcov/patches/0001-Fix-build-with-binutils-2.39.patch
@@ -0,0 +1,97 @@
+From fd1a4fd2f02cee49afd74e427e38c61b89154582 Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Wed, 14 Sep 2022 16:02:17 -0700
+Subject: [PATCH] Fix build with binutils 2.39
+
+---
+ src/CMakeLists.txt              | 20 +++++++++++++++++++-
+ src/parsers/bfd-disassembler.cc | 23 +++++++++++++++++++++++
+ 2 files changed, 42 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3b751852..fc396827 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -94,6 +94,7 @@ set (DISASSEMBLER_SRCS
+ )
+ 
+ set (HAS_LIBBFD "0")
++set (HAS_LIBBFD_DISASM_STYLED "0")
+ 
+ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 	if (LIBBFD_FOUND)
+@@ -106,6 +107,23 @@ if (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STR
+ 			${LIBBFD_BFD_LIBRARY}
+ 			${LIBBFD_IBERTY_LIBRARY}
+ 		)
++		include(CheckCSourceCompiles)
++		set(CMAKE_REQUIRED_LIBRARIES ${DISASSEMBLER_LIBRARIES})
++		check_c_source_compiles("
++		#define PACKAGE
++		#define PACKAGE_VERSION
++		#include <stdio.h>
++		#include <dis-asm.h>
++
++		int main(int argc, char **argv){
++			struct disassemble_info info;
++			init_disassemble_info(&info, stdout, NULL, NULL);
++			return 0;
++		}
++		" TEST_LIBBFD_DISASM_STYLED)
++		if (TEST_LIBBFD_DISASM_STYLED)
++			set (HAS_LIBBFD_DISASM_STYLED "1")
++		endif (TEST_LIBBFD_DISASM_STYLED)
+ 	endif (LIBBFD_FOUND)
+ endif (CMAKE_TARGET_ARCHITECTURES STREQUAL "i386" OR CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
+ 
+@@ -284,7 +302,7 @@ set (KCOV_SYSTEM_MODE_SRCS
+ 
+ set (KCOV_LIBRARY_PREFIX "/tmp")
+ 
+-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD}")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -Wall -D_GLIBCXX_USE_NANOSLEEP -DKCOV_LIBRARY_PREFIX=${KCOV_LIBRARY_PREFIX} -DKCOV_HAS_LIBBFD=${HAS_LIBBFD} -DKCOV_LIBFD_DISASM_STYLED=${HAS_LIBBFD_DISASM_STYLED}")
+ 
+ include_directories(
+ 	include/
+diff --git a/src/parsers/bfd-disassembler.cc b/src/parsers/bfd-disassembler.cc
+index 43653ee0..28815961 100644
+--- a/src/parsers/bfd-disassembler.cc
++++ b/src/parsers/bfd-disassembler.cc
+@@ -75,7 +75,11 @@ class BfdDisassembler : public IDisassembler
+ 	BfdDisassembler()
+ 	{
+ 		memset(&m_info, 0, sizeof(m_info));
++#if KCOV_LIBFD_DISASM_STYLED
++		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic, BfdDisassembler::opcodesFprintStyledFuncStatic);
++#else
+ 		init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic);
++#endif
+ 		m_disassembler = print_insn_i386;
+ 
+ 		m_info.arch = bfd_arch_i386;
+@@ -407,6 +411,25 @@ class BfdDisassembler : public IDisassembler
+ 		return out;
+ 	}
+ 
++#if KCOV_LIBFD_DISASM_STYLED
++	static int opcodesFprintStyledFuncStatic(void *info, enum disassembler_style style, const char *fmt, ...)
++	{
++		(void)style;
++		BfdDisassembler *pThis = (BfdDisassembler *)info;
++		char str[64];
++		int out;
++
++		va_list args;
++		va_start (args, fmt);
++		out = vsnprintf( str, sizeof(str) - 1, fmt, args );
++		va_end (args);
++
++		pThis->opcodesFprintFunc(str);
++
++		return out;
++	}
++#endif
++
+ 	typedef std::map<uint64_t, Section *> SectionCache_t;
+ 	typedef std::unordered_map<uint64_t, Instruction> InstructionAddressMap_t;
+ 	typedef std::map<uint64_t, Instruction *> InstructionOrderedMap_t;

From aa2562ceca976d9b7582a773c0fe9969c8840f94 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 04/29] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From 1ff196ac5b6bbaf95141c0f39a20b4e2f8b4767d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 05/29] build-style/void-cross: update to binutils 2.39.

Centralize versions and distfiles for void-cross.
---
 common/build-style/void-cross.sh             |  6 ++++
 common/environment/build-style/void-cross.sh | 34 ++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*
diff --git a/common/environment/build-style/void-cross.sh b/common/environment/build-style/void-cross.sh
index 62ce9eaa2e4a..f026f1619b7f 100644
--- a/common/environment/build-style/void-cross.sh
+++ b/common/environment/build-style/void-cross.sh
@@ -1,6 +1,40 @@
+_void_cross_setup_distfiles() {
+	local tgt=${sourcepkg/cross-}
+
+	local _binutils_version=2.39
+	local _gcc_version=10.2.1_pre1
+	local _glibc_version=2.32
+	local _musl_version=1.1.24
+	local _libucontext_version=1.0
+	local _linux_version=5.10.4
+
+	distfiles+=" ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
+	 https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz"
+	checksum+=" 645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
+	 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590"
+	case "$tgt" in
+		*-gnu*)
+			distfiles+=" ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz"
+			checksum+=" 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836"
+			;;
+		*-musl*)
+			distfiles+=" https://musl.libc.org/releases/musl-${_musl_version}.tar.gz"
+			checksum+=" 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3"
+			if [ -z "$cross_gcc_skip_go" ]; then
+				distfiles+=" https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
+				checksum+=" 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+			fi
+			;;
+		*)  msg_error "Could not determine libc for ${tgt}\n" ;;
+	esac
+	distfiles+=" ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
+	checksum+=" 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+}
+
 lib32disabled=yes
 nopie=yes
 create_wrksrc=yes
 
 nostrip_files+=" libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
  libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a libgmem.a"
+_void_cross_setup_distfiles

From 742fbca3adaf422c0bdf70877c4b9d2ab78e71d9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:41 -0700
Subject: [PATCH 06/29] cross-aarch64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-aarch64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..62a1bcf4de6e 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-O2 -march=armv8-a"

From 69c9772d963f445e1aa4af122ef987acba05f072 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 07/29] cross-aarch64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-aarch64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..1a27eb524106 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-O2 -march=armv8-a"

From 5683bf3a7212462d3e09589c4715cdae4a307c08 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 08/29] cross-arm-linux-gnueabi: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabi/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..1ef3010dc050 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--without-fp"

From 5ecd53a2326c7c26712dd2c5f87b29c46ebd6aea Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 09/29] cross-arm-linux-gnueabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..c35181bf64ad 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-Os -march=armv6 -mfpu=vfp -mfloat-abi=hard"

From b609f30c961dfc4bbfbde79d812a5ad2a905e44a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 10/29] cross-arm-linux-musleabi: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabi/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..bc063dc3a74e 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--without-fp"

From 65e9017a109690dff3820631eb5345383dad58f7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 11/29] cross-arm-linux-musleabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabihf/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..9c04be4c982a 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-Os -march=armv6 -mfpu=vfp -mfloat-abi=hard"

From 976f4fa14605d0cd08f639b6b584da2e647380bd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:42 -0700
Subject: [PATCH 12/29] cross-armv7l-linux-gnueabihf: rebuild for binutils 2.39

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..3e470c0d219e 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_glibc_cflags="-O2 -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard"

From 2f7c2f0359c0c73ac7851ccea0328ba7c13fcb08 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 13/29] cross-armv7l-linux-musleabihf: rebuild for binutils
 2.39

---
 .../cross-armv7l-linux-musleabihf/template    | 20 ++-----------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..5eaf57e7037c 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,19 +9,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_musl_cflags="-O2 -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard"

From 25f4f0fdd0ad6f5bc3db2724efa0c49ec17f7c96 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 14/29] cross-i686-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-i686-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..ad9592e7fa26 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,31 +1,15 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 # explicitly enable for final gcc, as gfortran does not build without on x86

From f11b492737ca1c00e7ce5b8dd96876a57bac88bc Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 15/29] cross-i686-pc-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..076dadf856fe 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
@@ -14,15 +10,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 # explicitly enable for final gcc, as gfortran does not build without on x86

From 93565c22d7b5ced1f84ed599231fbbb635050e20 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 16/29] cross-mips-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-mips-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..1485ffb0db6a 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From d73d4659c2c57efc92f44fcef392d313c6aa14e6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 17/29] cross-mips-linux-muslhf: rebuild for binutils 2.39

---
 srcpkgs/cross-mips-linux-muslhf/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..f82d85239e9e 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="hipperson0 <hipperson0@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 58c4b8a68b8b28c795d2fc1be866d6946523d637 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:43 -0700
Subject: [PATCH 18/29] cross-mipsel-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-mipsel-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..75a11c9b9702 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 065f45dcdce4fecfc70d6785bd9d934dd988b85b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 19/29] cross-mipsel-linux-muslhf: rebuild for binutils 2.39

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..766f1911ebf0 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 40b04e9ed2a633fe421ada5eccac087c55c13eec Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 20/29] cross-powerpc-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..804f67a4a9d5 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_gcc_skip_go=yes

From a6fa254c293dee1629dda47ec20a2021385b6d26 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 21/29] cross-powerpc-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..7513928eb5b3 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 3c2bda66076818b6f42e9ac3a8d334f2ada066a3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 22/29] cross-powerpc64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..a6e782d78aa6 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"
@@ -16,15 +12,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From d3020ce2a16a648575ffe2b696316e25d6c072a6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 23/29] cross-powerpc64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 1ebd0fb2048d..a658d4582578 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"
@@ -15,19 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 4f18c36be7db7973cafb3fc1201b36648383e9b0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 24/29] cross-powerpc64le-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 733f5851da5c..e8458b770e32 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"
@@ -16,15 +12,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From 4d602c6c562cc15d539cdc74b495818aca3514cd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:44 -0700
Subject: [PATCH 25/29] cross-powerpc64le-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 20 ++-----------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index 76a70aa1d6db..367dfad2a920 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,7 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"
@@ -15,19 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_binutils_configure_args="--enable-secureplt"

From f59009d1f72c9fa1dd88652d9f7efdbedf1b1364 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 26/29] cross-powerpcle-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 347b8fcf4f55..950fa1a3e62f 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"
@@ -15,15 +11,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 225a701d55fee2802e528c0e15b131f113469799 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 27/29] cross-powerpcle-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-musl/template | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index ec9324ddaa99..e57a2cfe4e12 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,17 +10,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 cross_gcc_skip_go=yes

From 81df3063d490215575cc41ba8028f273288168e9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 28/29] cross-x86_64-linux-gnu: rebuild for binutils 2.39

---
 srcpkgs/cross-x86_64-linux-gnu/template | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 0078fbe7224b..cc0e5744d648 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,7 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_glibc_version=2.32
-_linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
@@ -14,15 +10,6 @@ short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="q66 <daniel@octaforge.org>"
 license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.voidlinux.org/"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- ${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec"
 nocross=yes
 
 # explicitly enable for final gcc, gfortran does not build without on x86

From c5608657c80a0b12d03e96caf1e58cb5d6d2cf24 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 20:44:45 -0700
Subject: [PATCH 29/29] cross-x86_64-linux-musl: rebuild for binutils 2.39

---
 srcpkgs/cross-x86_64-linux-musl/template | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..6d8812bb21bd 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,31 +1,15 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
-_gcc_version=10.2.1_pre1
-_musl_version=1.1.24
-_linux_version=5.10.4
-_libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz
- https://musl.libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v5.x/linux-${_linux_version}.tar.xz
- https://github.com/kaniini/libucontext/archive/libucontext-${_libucontext_version}.tar.gz"
-checksum="3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
- 772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
- 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
- 904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
- 23714e99a87f6dea82e8a073c526325161dd65462459820b16a6162be91955bb"
+homepage="https://www.voidlinux.org/"
 nocross=yes
 
 # explicitly enable for final gcc, gfortran does not build without on x86

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (8 preceding siblings ...)
  2022-09-17  5:09 ` oreo639
@ 2022-09-17 11:44 ` dkwo
  2022-09-17 11:53 ` dkwo
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2022-09-17 11:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/39312#issuecomment-1250056425

Comment:
Thanks. Do you mind fixing the trivial lint errors for the cross* pkgs?
It's a bit tedious, but this way we may catch other stuff when CI goes through.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (9 preceding siblings ...)
  2022-09-17 11:44 ` dkwo
@ 2022-09-17 11:53 ` dkwo
  2022-09-17 12:05 ` paper42
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2022-09-17 11:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/39312#issuecomment-1250057570

Comment:
Sorry, ignore my previous comment.
It's enough to remove ci skip to let it go through ci.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (10 preceding siblings ...)
  2022-09-17 11:53 ` dkwo
@ 2022-09-17 12:05 ` paper42
  2022-09-18 22:19 ` [PR PATCH] [Updated] " oreo639
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paper42 @ 2022-09-17 12:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/39312#issuecomment-1250059308

Comment:
> Sorry, ignore my previous comment.
> It's enough to remove ci skip to let it go through ci.

ci skip is here for a reason, building cross-* would time out anyway

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (11 preceding siblings ...)
  2022-09-17 12:05 ` paper42
@ 2022-09-18 22:19 ` oreo639
  2022-09-18 22:37 ` oreo639
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-18 22:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 32790 bytes --]

From 1f67f4d5013d661a781fb0151894affea523c22c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/28] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From c360c43b64a469385a92c02a94d2de9beb752317 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/28] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From f4490c1b3c0dc55dddb3fcf1095582a0d5af3857 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 03/28] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From 1ef42937c775c4fa63f2f8ab13e9c0a31a617966 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 04/28] build-style/void-cross: update flags for binutils 2.39.

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

From 6c6d658d7d40579ce27f9f633ddcc4e185ba1b7c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:05 -0700
Subject: [PATCH 05/28] cross-aarch64-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-aarch64-linux-gnu/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..bb296a981d8a 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4

From 07547731074b247658d90ac0093a728ac9090062 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:05 -0700
Subject: [PATCH 06/28] cross-aarch64-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-aarch64-linux-musl/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..512e90b087dc 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From b3378997cdee012805951da105a3c4d3855fd222 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:05 -0700
Subject: [PATCH 07/28] cross-arm-linux-gnueabi: update to binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabi/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..d662aef63e64 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4

From f299d0ce8d9bf7c2b9291dca225c6b5bd1500be3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 08/28] cross-arm-linux-gnueabihf: update to binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..df92d012c014 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4

From 5b10246fca6f9f21694dc0dac635c676e39e52c5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 09/28] cross-arm-linux-musleabi: update to binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabi/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..721f4953c1f7 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From ba347b20d17f6d3b281671b41575467114ff44e4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 10/28] cross-arm-linux-musleabihf: update to binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabihf/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..3202fbec614d 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From f9c579bd26c0480b29da7f500a47b74988947bbd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 11/28] cross-armv7l-linux-gnueabihf: update to binutils 2.39

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..fe0edc81102d 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4

From abfe15d16ff6a53692e91e2e721bb1e9620a7a01 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 12/28] cross-armv7l-linux-musleabihf: update to binutils 2.39

---
 srcpkgs/cross-armv7l-linux-musleabihf/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..391db36ea8a3 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From 54bee71068dde48d5c693a58317654ee0c92d301 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 13/28] cross-i686-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-i686-linux-musl/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..1c9c9acd74a0 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From c4ccd21e55a7f99f72b1927a692277cc952ca14a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 14/28] cross-i686-pc-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..df4e93c6007d 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4

From d03103a5832ee3cd787d07f2586c02511e747d41 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 15/28] cross-mips-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-mips-linux-musl/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..8ad1f5ab93f5 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From 30fb2c7563c32e99c609b5d4d75fb627fa5377a1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 16/28] cross-mips-linux-muslhf: update to binutils 2.39

---
 srcpkgs/cross-mips-linux-muslhf/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..30d625f21e54 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From 9cddc583beb3373460fb175e5e6c05905681d1fe Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 17/28] cross-mipsel-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-mipsel-linux-musl/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..1d603a8d75d4 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From 25692d5a4ac953d40a69c0204538322aeed98cc3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 18/28] cross-mipsel-linux-muslhf: update to binutils 2.39

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..a15a0af7cd73 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From 11e728ef4a7da4f183471b637ee354d491e5c3fc Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 19/28] cross-powerpc-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-powerpc-linux-gnu/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..08e6ec523c7c 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4

From 5ca15dbb2b4ad8505af4edd41d7100c78ae87849 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:06 -0700
Subject: [PATCH 20/28] cross-powerpc-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-powerpc-linux-musl/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..85ba90ce0e0a 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From f656182d23d5257a2a57238fefd994420f71fc83 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:07 -0700
Subject: [PATCH 21/28] cross-powerpc64-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..371afb85f4fd 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4

From e99213aa1720f52f6666338dd1930a51d38d26ce Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:07 -0700
Subject: [PATCH 22/28] cross-powerpc64-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-musl/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 016f18776a6d..308f4dc112c5 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From f6311b272d95c9573765b7aeae6582fe7b320462 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:07 -0700
Subject: [PATCH 23/28] cross-powerpc64le-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 463d7e92d20d..0d3fd75aedc2 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4

From 4c94582c5340c4c8de7ace930b772e3f98120ac1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:07 -0700
Subject: [PATCH 24/28] cross-powerpc64le-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index c17a3cccfe29..dded6118011e 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From 10c75df905fd4c7b3e63e1a9967f83c109fe79be Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:07 -0700
Subject: [PATCH 25/28] cross-powerpcle-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 9aede3c465ce..d52610b16093 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4

From 580da3e2c285dbe6d5683d9fca7ea4e24ac53ebb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:07 -0700
Subject: [PATCH 26/28] cross-powerpcle-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-musl/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index 045cfda987fe..98b08a06d5b1 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

From 6ba22a97541bf5a1f0ec65103b8921a9ef552b7a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:07 -0700
Subject: [PATCH 27/28] cross-x86_64-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-x86_64-linux-gnu/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 8918f3c22a1c..37a51022935c 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4

From 1dc1d016f6cb11aa4c33d2d8c5eb546d8f62c414 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:19:07 -0700
Subject: [PATCH 28/28] cross-x86_64-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-x86_64-linux-musl/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..ba0d21323566 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,5 +1,5 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (12 preceding siblings ...)
  2022-09-18 22:19 ` [PR PATCH] [Updated] " oreo639
@ 2022-09-18 22:37 ` oreo639
  2022-09-18 22:39 ` oreo639
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-18 22:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 38261 bytes --]

From 1f67f4d5013d661a781fb0151894affea523c22c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/28] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From c360c43b64a469385a92c02a94d2de9beb752317 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/28] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From f4490c1b3c0dc55dddb3fcf1095582a0d5af3857 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 03/28] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From 1ef42937c775c4fa63f2f8ab13e9c0a31a617966 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 04/28] build-style/void-cross: update flags for binutils 2.39.

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

From a186b917da06eb575a5cc6b4b81baeeaa0e10c42 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:40 -0700
Subject: [PATCH 05/28] cross-aarch64-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-aarch64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..8e76d5e3bdb2 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 942926121945b35651574f3a822fec41b85067d1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:40 -0700
Subject: [PATCH 06/28] cross-aarch64-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-aarch64-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..190cd919ad57 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 74b22c8d0caac2e400c722ab83d3cc68ca882955 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:40 -0700
Subject: [PATCH 07/28] cross-arm-linux-gnueabi: update to binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..e607cd4ca6e4 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From f3372239ef5ed66b87174d3e7afef9b8893e2f64 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:40 -0700
Subject: [PATCH 08/28] cross-arm-linux-gnueabihf: update to binutils 2.39

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..d4af41a7f994 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 4d167ba38fec5184af35030246673bb4b172ae85 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:40 -0700
Subject: [PATCH 09/28] cross-arm-linux-musleabi: update to binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..315ec8be1a50 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 092972e760e3857b6c91bb294bc318d5856f16f6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:40 -0700
Subject: [PATCH 10/28] cross-arm-linux-musleabihf: update to binutils 2.39

---
 srcpkgs/cross-arm-linux-musleabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..c6c025bb74b6 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From fdf09cc188e867c82a4bf27cf9254c259977af9e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:40 -0700
Subject: [PATCH 11/28] cross-armv7l-linux-gnueabihf: update to binutils 2.39

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..2d7b5cb2983d 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From cd154f306b1c0dcaa032c45d9c59d2d68be0b79a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:40 -0700
Subject: [PATCH 12/28] cross-armv7l-linux-musleabihf: update to binutils 2.39

---
 srcpkgs/cross-armv7l-linux-musleabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..1d6a6b832372 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 61882db3e2c1d2751ff21cc65889ba5813462663 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 13/28] cross-i686-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-i686-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..a9b581ae389b 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From d5c76f13e81f84c3a27a3c9e270914fce8a563d1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 14/28] cross-i686-pc-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..06f6210a07f3 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 8c675c83d25d464568cb6da4abcca73e57579552 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 15/28] cross-mips-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-mips-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..adfac253ed72 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"

From 09a39324f06e612c77472fc97b28e77b9c5b8fdf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 16/28] cross-mips-linux-muslhf: update to binutils 2.39

---
 srcpkgs/cross-mips-linux-muslhf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..68254431209c 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"

From a216f8ceb05d2f30ef02d960be99fb197b2b42fd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 17/28] cross-mipsel-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-mipsel-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..aae0e811bae0 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"

From ffa5d96c3690652058d67da6df2440b6c3d0b7b5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 18/28] cross-mipsel-linux-muslhf: update to binutils 2.39

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..290cd032f654 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"

From 446e85b8595b7a58df8ad234dfd85969d4bb2597 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 19/28] cross-powerpc-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-powerpc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..bfc435703067 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From d9c6f84cf5578eaa3297ceaac29f847acff73e3c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 20/28] cross-powerpc-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-powerpc-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..95f22775a5cf 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"

From e4c14232abf1d90b4f67b0ca4e26437e1891a0b2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 21/28] cross-powerpc64-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..e77a194663f0 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"

From d94f65d54c667b5f83f2e2b8a8e6058e5d3df4f6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 22/28] cross-powerpc64-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-powerpc64-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 016f18776a6d..0521c2f6ba31 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"

From a983b8f9293eeacb015a31e301707ea67af4ec88 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 23/28] cross-powerpc64le-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 463d7e92d20d..4c295a28f938 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"

From 860d8136f7c0114166e7fbd3f24d36829f2a649d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:41 -0700
Subject: [PATCH 24/28] cross-powerpc64le-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index c17a3cccfe29..b80f59cf5639 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"

From 93b403194c7c9612395a554a1c3adbbc79ceeeb9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:42 -0700
Subject: [PATCH 25/28] cross-powerpcle-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 9aede3c465ce..545a678406f6 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 4fb68291d3339e2e465a7d4755d469eb61242c63 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:42 -0700
Subject: [PATCH 26/28] cross-powerpcle-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-powerpcle-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index 045cfda987fe..00b578749457 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"

From 325035cbeff24f350a74f14b70ef4b424d24aaef Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:42 -0700
Subject: [PATCH 27/28] cross-x86_64-linux-gnu: update to binutils 2.39

---
 srcpkgs/cross-x86_64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 8918f3c22a1c..9d31bf5f674f 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From dd2d6f00cfd6dcec676d0bab769dbb4db0f8acba Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:36:42 -0700
Subject: [PATCH 28/28] cross-x86_64-linux-musl: update to binutils 2.39

---
 srcpkgs/cross-x86_64-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..2d5ee1a71b6d 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (13 preceding siblings ...)
  2022-09-18 22:37 ` oreo639
@ 2022-09-18 22:39 ` oreo639
  2022-09-18 22:59 ` oreo639
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-18 22:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 38284 bytes --]

From 1f67f4d5013d661a781fb0151894affea523c22c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/28] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From c360c43b64a469385a92c02a94d2de9beb752317 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/28] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From f4490c1b3c0dc55dddb3fcf1095582a0d5af3857 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 03/28] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From 66041d000f8ee6bb3991312ae2d36388b9a4c61a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 04/28] build-style/void-cross: update flags for binutils 2.39

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

From c4cb722b574c89e196f0f4ac955816fed9f74f6b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:22 -0700
Subject: [PATCH 05/28] cross-aarch64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..8e76d5e3bdb2 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 8bc2fc0c8c2826349a217823a7438df2263d4f44 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:22 -0700
Subject: [PATCH 06/28] cross-aarch64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..190cd919ad57 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 562a70d5856c48fde873ac0458076cd41c1b5cfa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:22 -0700
Subject: [PATCH 07/28] cross-arm-linux-gnueabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..e607cd4ca6e4 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From b362f31c922882d81434e9a37b727bb142f3116d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:22 -0700
Subject: [PATCH 08/28] cross-arm-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..d4af41a7f994 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 8489ed6d4bb1381306e6db0b3716990c88fefc56 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:22 -0700
Subject: [PATCH 09/28] cross-arm-linux-musleabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..315ec8be1a50 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 7a70de699c5b401ea925f0354ad3ff7ce0717249 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 10/28] cross-arm-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..c6c025bb74b6 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From e8b706c58f9e5a60a7f38f99f2cb60938aa0b925 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 11/28] cross-armv7l-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..2d7b5cb2983d 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 6c07f3599f08cfa7477e123a21014c7caed6305e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 12/28] cross-armv7l-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-musleabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..1d6a6b832372 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 4c02186a6c72adfe8c8e63404ead8bffa72cceaa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 13/28] cross-i686-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-i686-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..a9b581ae389b 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From c91937cee8919a574f7e654423f6c43590f7e09f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 14/28] cross-i686-pc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..06f6210a07f3 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 0329937de8de3b2d6f6677d68f9ffd7fc4c6788e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 15/28] cross-mips-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..adfac253ed72 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"

From 3779e45865768cd2c82968cbffff6700a2838630 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 16/28] cross-mips-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-muslhf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..68254431209c 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"

From c6dd93f3f14fa318398101fc8cd9fdb21a132fa7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 17/28] cross-mipsel-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..aae0e811bae0 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"

From 5abe8b82efe014fce2010a8f688a05d05997a147 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 18/28] cross-mipsel-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..290cd032f654 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"

From 39b6daa8eed6ae24e821e24ee059bd81acd9422b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 19/28] cross-powerpc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..bfc435703067 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From e3e77f058f6b1500018903dd1f706e2ee1f2893b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 20/28] cross-powerpc-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..95f22775a5cf 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"

From f5a76cba216f67043760152f57d3460517dad57a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 21/28] cross-powerpc64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..e77a194663f0 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"

From ef9ce2f8078278ad81f4f37159adee4e2aec3ce8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 22/28] cross-powerpc64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 016f18776a6d..0521c2f6ba31 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"

From 7f8fb34e227197162f9772655ad4f868aca46abb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:23 -0700
Subject: [PATCH 23/28] cross-powerpc64le-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 463d7e92d20d..4c295a28f938 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"

From 610d699f1d08659d7e002b25f965eb02b6a63689 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:24 -0700
Subject: [PATCH 24/28] cross-powerpc64le-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index c17a3cccfe29..b80f59cf5639 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"

From ed7a6aabd3eeea2c46663eb153fea141979f408b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:24 -0700
Subject: [PATCH 25/28] cross-powerpcle-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 9aede3c465ce..545a678406f6 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 154f36fec19f918ed43593fc40d263ed56817405 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:24 -0700
Subject: [PATCH 26/28] cross-powerpcle-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index 045cfda987fe..00b578749457 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"

From 9ef297f5aac1fca74e5b2905f21c0456345fa420 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:24 -0700
Subject: [PATCH 27/28] cross-x86_64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 8918f3c22a1c..9d31bf5f674f 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From af8ad24b58a953b9431085e2af12e9887e0bb03d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:39:24 -0700
Subject: [PATCH 28/28] cross-x86_64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..2d5ee1a71b6d 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (14 preceding siblings ...)
  2022-09-18 22:39 ` oreo639
@ 2022-09-18 22:59 ` oreo639
  2022-09-19  0:27 ` oreo639
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-18 22:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 43412 bytes --]

From 1f67f4d5013d661a781fb0151894affea523c22c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/28] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From c360c43b64a469385a92c02a94d2de9beb752317 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/28] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From f4490c1b3c0dc55dddb3fcf1095582a0d5af3857 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 03/28] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From 66041d000f8ee6bb3991312ae2d36388b9a4c61a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 04/28] build-style/void-cross: update flags for binutils 2.39

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

From a4bba14857bdadd678f1020800711333564aa519 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:37 -0700
Subject: [PATCH 05/28] cross-aarch64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..8e76d5e3bdb2 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 0db3c7aa841c03ec7d836c28b860e6b89f9deb1e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:37 -0700
Subject: [PATCH 06/28] cross-aarch64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..cb2719bd3162 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 4f9f3534b182039811203e51c2dc94b5bb366bf6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:37 -0700
Subject: [PATCH 07/28] cross-arm-linux-gnueabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..e607cd4ca6e4 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 113d3d8f9719e6d174dd03e13860ded49ffd14c9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 08/28] cross-arm-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..d4af41a7f994 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 14b28469a05786fbaeb64c6102977c3b337ba8cb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 09/28] cross-arm-linux-musleabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabi/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..a5294a229cc7 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 1839d817dcaff715fd7bb216c3d123ee6230b55b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 10/28] cross-arm-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..e307aa153674 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 70d1c3eda5cfdb66c1dd1b6efa8157365c84a911 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 11/28] cross-armv7l-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..2d7b5cb2983d 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From b8822081b25b12a1f621905eecf1246e6233db8d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 12/28] cross-armv7l-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..e05b3835d6a3 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 1dc471b4315ac96272b0dbac9af498ce5fad086f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 13/28] cross-i686-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-i686-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..a9b581ae389b 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From a6b46da6a91202d5b87f36db969d0e7fc99db101 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 14/28] cross-i686-pc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..06f6210a07f3 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 6f3fabd5afca2fa650b2111dbd1aad0838ceab98 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 15/28] cross-mips-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..8cd4abd1ddca 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 9ddaf9f90cacfa73f26f69143b4f5efc1d216412 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 16/28] cross-mips-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..0b0fa564b75e 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="hipperson0 <hipperson0@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 393c68bf0f294559b5c180b4b8ef9d4615acadb9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 17/28] cross-mipsel-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..d380bde73e7c 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 3556a9c528298d2eb7b4defe281f192e9760e709 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 18/28] cross-mipsel-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..4b7e0d3c63a5 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From fcfff83c0946ab0dafc6b65caaec33b626871097 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 19/28] cross-powerpc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..bfc435703067 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 8d876fbe48888c763e30e49328751f7dd727d2c1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 20/28] cross-powerpc-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..f14ff19eee8d 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 85ec2013e88a81a17a73f4a23007954f9ab78e20 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:38 -0700
Subject: [PATCH 21/28] cross-powerpc64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..e77a194663f0 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"

From 5762648e800acc7374def16fa405fbc61ee41109 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:39 -0700
Subject: [PATCH 22/28] cross-powerpc64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 016f18776a6d..0521c2f6ba31 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"

From ebeb34a5019ccbf485d7214a97ccace7a33de927 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:39 -0700
Subject: [PATCH 23/28] cross-powerpc64le-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 463d7e92d20d..4c295a28f938 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"

From 03242bc2c48204056f4ce83fb96669ca2e865277 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:39 -0700
Subject: [PATCH 24/28] cross-powerpc64le-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index c17a3cccfe29..b80f59cf5639 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"

From 502de9958ee84a7836c58d7247160f6f2b5947e9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:39 -0700
Subject: [PATCH 25/28] cross-powerpcle-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 9aede3c465ce..545a678406f6 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 418376e7ec8d2e92f9d3df929b28deafe6813da7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:39 -0700
Subject: [PATCH 26/28] cross-powerpcle-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index 045cfda987fe..db7a81ffe61f 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 6210c19f00ad0892a6d3b4f28c6715032825b7d9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:39 -0700
Subject: [PATCH 27/28] cross-x86_64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 8918f3c22a1c..9d31bf5f674f 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 7b2bdd7c6f899781e05eaa4f233dce7b1f21a648 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 15:59:39 -0700
Subject: [PATCH 28/28] cross-x86_64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..2d5ee1a71b6d 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (15 preceding siblings ...)
  2022-09-18 22:59 ` oreo639
@ 2022-09-19  0:27 ` oreo639
  2022-09-25  1:12 ` oreo639
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-19  0:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 45282 bytes --]

From 1f67f4d5013d661a781fb0151894affea523c22c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/28] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From c360c43b64a469385a92c02a94d2de9beb752317 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/28] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From f4490c1b3c0dc55dddb3fcf1095582a0d5af3857 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 03/28] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From 66041d000f8ee6bb3991312ae2d36388b9a4c61a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 04/28] build-style/void-cross: update flags for binutils 2.39

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

From 6c23798ebc0a3653d4bb06bbfbc659922a31e235 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 05/28] cross-aarch64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..8e76d5e3bdb2 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 4f862cdc0da4ec8e89ead60486e6ca54ceeed09b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 06/28] cross-aarch64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..cb2719bd3162 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 003acdb92505ef7eab019a5e0212a35a1477d3b0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 07/28] cross-arm-linux-gnueabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..e607cd4ca6e4 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 33406d210d1a8ce43a0cfadcaf5578ea5eb3dd66 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 08/28] cross-arm-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..d4af41a7f994 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From e3df4e62962c772dad1e220e5a43f145e1b0d5d1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 09/28] cross-arm-linux-musleabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabi/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..a5294a229cc7 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 6519ab13018f2354629d8be3e6b7f0b2a9be69a7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 10/28] cross-arm-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..e307aa153674 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From cf5b65269ba3f661f0b07946c5c718e7c48c8cb1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 11/28] cross-armv7l-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..2d7b5cb2983d 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 005695ba95e858295f89227c8491f334418606aa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 12/28] cross-armv7l-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..e05b3835d6a3 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From cb91263aa2be43923ca839dc40b3cbb2c871fa25 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 13/28] cross-i686-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-i686-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..2b15505e04ff 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From c44e55f2b7a60daec77eb96eeb0e9566c1ae0a08 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 14/28] cross-i686-pc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..06f6210a07f3 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 20c515bd5cd8a0f9ad457fbb08bb60d5c639b223 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 15/28] cross-mips-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..8cd4abd1ddca 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 3681359f11ba9b5b1f1efd51582f3ecbf9981179 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 16/28] cross-mips-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..0b0fa564b75e 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="hipperson0 <hipperson0@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From fe21c9c666a9e8cf76912e0e9144b3d8b13cbd75 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 17/28] cross-mipsel-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..d380bde73e7c 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 94feae1a4299a5308e0a5d09e9e33ba9582ed399 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 18/28] cross-mipsel-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..4b7e0d3c63a5 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 9f53f4a315f1a6424e489a0e9d67d2e7c8a35af4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 19/28] cross-powerpc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..bfc435703067 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 0671834576f83dcd3c9f65e8f82ab921ae710626 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 20/28] cross-powerpc-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..f14ff19eee8d 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 15911e45ced16b4b7817568d6f9c1a8b06a53351 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 21/28] cross-powerpc64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..e77a194663f0 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"

From 0080cbd14032eb92177a1fd92983ac53835eccaf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 22/28] cross-powerpc64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 016f18776a6d..99c5693b8fcb 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From f94a5c5483f3a8b64a9445ac16dfc792c7e308ec Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 23/28] cross-powerpc64le-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 463d7e92d20d..4c295a28f938 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"

From 7719f4a719af4d61246c3c5f4ef72fb773b301b1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:57 -0700
Subject: [PATCH 24/28] cross-powerpc64le-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index c17a3cccfe29..06571aee41c1 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From fd2e177ad5edaf9e18fc901c1b60c0ebc08d0f7c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:57 -0700
Subject: [PATCH 25/28] cross-powerpcle-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 9aede3c465ce..545a678406f6 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 4bbcac3a3e049af4b668a420d2182968f7d53edc Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:57 -0700
Subject: [PATCH 26/28] cross-powerpcle-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index 045cfda987fe..db7a81ffe61f 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 907eb33e522375cf40b7dfba8a105d7d1372e2ee Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:57 -0700
Subject: [PATCH 27/28] cross-x86_64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 8918f3c22a1c..9d31bf5f674f 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 66948bc1c1775e381dd256b937013f92b9a07639 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:57 -0700
Subject: [PATCH 28/28] cross-x86_64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..64f765893b53 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (16 preceding siblings ...)
  2022-09-19  0:27 ` oreo639
@ 2022-09-25  1:12 ` oreo639
  2022-09-25  1:20 ` oreo639
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-25  1:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 90951 bytes --]

From 229248a984026c0f22d4d05852d131a3224419b5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/28] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From d02fac824817608de5042679d2f6afaf25dbc22a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/28] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch |   60 -
 ...ffdc202f04397f31557f17170b40bc42b77a.patch | 1181 +++++++++++++++++
 .../fix-libcollector-without-java.patch       |   53 +
 .../patches/ppc64-revert-gnu-attributes.patch |   66 +-
 srcpkgs/binutils/template                     |   22 +-
 5 files changed, 1267 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fe39ffdc202f04397f31557f17170b40bc42b77a.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fe39ffdc202f04397f31557f17170b40bc42b77a.patch b/srcpkgs/binutils/patches/fe39ffdc202f04397f31557f17170b40bc42b77a.patch
new file mode 100644
index 000000000000..9ce0a8ff9d6d
--- /dev/null
+++ b/srcpkgs/binutils/patches/fe39ffdc202f04397f31557f17170b40bc42b77a.patch
@@ -0,0 +1,1181 @@
+From fe39ffdc202f04397f31557f17170b40bc42b77a Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 14 Sep 2022 01:11:45 -0700
+Subject: [PATCH] gprofng: fix build issues on musl
+
+gprofng/ChangeLog
+2022-09-14  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29477
+	* configure.ac: Set __MUSL_LIBC.
+	* configure: Rebuild.
+	* common/config.h.in: Rebuild.
+	* src/collector_module.h: Fix compiler errors because mmap64, open64,
+	pwrite64 are macros and getcontext() is absent on musl.
+	* libcollector/collector.c: Likewise.
+	* libcollector/hwprofile.c: Likewise.
+	* libcollector/iolib.c: Likewise.
+	* libcollector/libcol_util.c: Likewise.
+	* libcollector/linetrace.c: Likewise.
+	* libcollector/memmgr.c: Likewise.
+	* libcollector/profile.c: Likewise.
+	* libcollector/unwind.c: Likewise.
+	* libcollector/dispatcher.c: Likewise.
+	* src/Experiment.cc: Likewise.
+	* libcollector/collector.h: Use dlsym() because dlvsym() is not defined
+	on musl.
+	* libcollector/iotrace.c: Remove interposition of versioned functions.
+	* libcollector/mmaptrace.c: Likewise.
+	* libcollector/libcol_util.h: Fix -Wint-to-pointer-cast warnings.
+	* libcollector/jprofile.c: Likewise.
+	* libcollector/synctrace.c: Include "collector.h".
+	* src/Print.cc: Use get_basename() because basename() is not defined
+	on musl.
+	* common/hwcdrv.c: Fix -Wformat= warnings.
+---
+ gprofng/common/config.h.in         |   3 +
+ gprofng/common/hwcdrv.c            |   6 +-
+ gprofng/configure                  |  30 ++++-
+ gprofng/configure.ac               |  27 ++++-
+ gprofng/libcollector/collector.c   |   9 +-
+ gprofng/libcollector/collector.h   |   6 +-
+ gprofng/libcollector/dispatcher.c  |   4 +-
+ gprofng/libcollector/hwprofile.c   |  11 +-
+ gprofng/libcollector/iolib.c       |  52 ++++-----
+ gprofng/libcollector/iotrace.c     | 179 +++++++++++++++--------------
+ gprofng/libcollector/jprofile.c    |   6 -
+ gprofng/libcollector/libcol_util.c |  19 ++-
+ gprofng/libcollector/libcol_util.h |   9 +-
+ gprofng/libcollector/linetrace.c   |   4 +-
+ gprofng/libcollector/memmgr.c      |   2 +-
+ gprofng/libcollector/mmaptrace.c   | 132 ++++++++-------------
+ gprofng/libcollector/profile.c     |   2 +-
+ gprofng/libcollector/synctrace.c   |   3 +-
+ gprofng/libcollector/unwind.c      |   2 +-
+ gprofng/src/Experiment.cc          |   4 +-
+ gprofng/src/Print.cc               |   6 +-
+ gprofng/src/collector_module.h     |   6 +-
+ 22 files changed, 277 insertions(+), 245 deletions(-)
+
+diff --git a/gprofng/common/config.h.in b/gprofng/common/config.h.in
+index 8409ce74a57..f8484f238fd 100644
+--- a/gprofng/common/config.h.in
++++ b/gprofng/common/config.h.in
+@@ -118,3 +118,6 @@
+ 
+ /* Define to 1 if you need to in order for `stat' and other things to work. */
+ #undef _POSIX_SOURCE
++
++/* Build with musl-libc. */
++#undef __MUSL_LIBC
+diff --git a/gprofng/common/hwcdrv.c b/gprofng/common/hwcdrv.c
+index caab9839b49..05390e239df 100644
+--- a/gprofng/common/hwcdrv.c
++++ b/gprofng/common/hwcdrv.c
+@@ -440,7 +440,7 @@ typedef struct
+ { // per-thread context
+   counter_state_t *ctr_list;
+   int signal_fd;                // fd that caused the most recent signal
+-  pthread_t tid;                // for debugging signal delivery problems
++  pid_t tid;			// for debugging signal delivery problems
+ } hdrv_pcl_ctx_t;
+ 
+ /*---------------------------------------------------------------------------*/
+@@ -1321,7 +1321,7 @@ hwcdrv_free_counters () // note: only performs shutdown for this thread
+   for (int ii = 0; ii < hdrv_pcl_state.hwcdef_cnt; ii++)
+     if (stop_one_ctr (ii, ctr_list))
+       hwc_rc = HWCFUNCS_ERROR_GENERIC;
+-  TprintfT (DBG_LT1, "hwcdrv: hwcdrv_free_counters(tid=0x%lx).\n", pctx->tid);
++  TprintfT (DBG_LT1, "hwcdrv: hwcdrv_free_counters(tid=0x%lx).\n", (long) pctx->tid);
+   pctx->ctr_list = NULL;
+   return hwc_rc;
+ }
+@@ -1351,7 +1351,7 @@ hwcdrv_start (void) /* must be called from each thread ? */
+       return HWCFUNCS_ERROR_UNEXPECTED;
+     }
+   pctx->tid = hwcdrv_gettid ();
+-  TprintfT (DBG_LT1, "hwcdrv: hwcdrv_start(tid=0x%lx)\n", pctx->tid);
++  TprintfT (DBG_LT1, "hwcdrv: hwcdrv_start(tid=0x%lx)\n", (long) pctx->tid);
+ 
+   /*
+    * create per-thread counter list
+diff --git a/gprofng/configure b/gprofng/configure
+index fad5b030072..301ac10050b 100755
+--- a/gprofng/configure
++++ b/gprofng/configure
+@@ -16572,7 +16572,7 @@ class Simple{
+   }
+ }
+ EOF
+-      if { ac_try='$JAVAC conftest.java &5 2>&1'
++      if { ac_try='$JAVAC configtest.java &5 2>&1'
+   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -16608,6 +16608,34 @@ $as_echo "#define DEBUG 1" >>confdefs.h
+ 
+ fi
+ 
++cat > "dummy.c" << EOF
++#include <features.h>
++#if defined(__UCLIBC__)
++LIBC=uclibc
++#elif defined(__dietlibc__)
++LIBC=dietlibc
++#elif defined(__GLIBC__)
++LIBC=gnu
++#else
++#include <stdarg.h>
++/* First heuristic to detect musl libc.  */
++#ifdef __DEFINED_va_list
++LIBC=musl
++#else
++LIBC=gnu
++#endif
++#endif
++EOF
++cc_set_libc=`$CC -E "dummy.c" 2>/dev/null | grep '^LIBC=' | sed 's, ,,g'`
++eval "$cc_set_libc"
++echo "cc_set_libc=$cc_set_libc;"
++if test "$LIBC" = musl; then
++
++$as_echo "#define __MUSL_LIBC 1" >>confdefs.h
++
++fi
++
++
+ # Check if linker supports --as-needed and --no-as-needed options.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
+ $as_echo_n "checking linker --as-needed support... " >&6; }
+diff --git a/gprofng/configure.ac b/gprofng/configure.ac
+index e9453109602..2d7640dfdc8 100644
+--- a/gprofng/configure.ac
++++ b/gprofng/configure.ac
+@@ -142,7 +142,7 @@ class Simple{
+   }
+ }
+ EOF
+-      if AC_TRY_COMMAND($JAVAC conftest.java &AS_MESSAGE_LOG_FD 2>&1); then
++      if AC_TRY_COMMAND($JAVAC configtest.java &AS_MESSAGE_LOG_FD 2>&1); then
+ 	GPROFNG_BROKEN_JAVAC=no
+       else
+ 	GPROFNG_BROKEN_JAVAC=yes
+@@ -159,6 +159,31 @@ if test "${enable_gprofng_debug}" = yes; then
+     AC_DEFINE(DEBUG, 1, [Enable debugging output.])
+ fi
+ 
++cat > "dummy.c" << EOF
++#include <features.h>
++#if defined(__UCLIBC__)
++LIBC=uclibc
++#elif defined(__dietlibc__)
++LIBC=dietlibc
++#elif defined(__GLIBC__)
++LIBC=gnu
++#else
++#include <stdarg.h>
++/* First heuristic to detect musl libc.  */
++#ifdef __DEFINED_va_list
++LIBC=musl
++#else
++LIBC=gnu
++#endif
++#endif
++EOF
++cc_set_libc=`$CC -E "dummy.c" 2>/dev/null | grep '^LIBC=' | sed 's, ,,g'`
++eval "$cc_set_libc"
++if test "$LIBC" = musl; then
++  AC_DEFINE(__MUSL_LIBC, 1, [Build with musl-libc.])
++fi
++
++
+ # Check if linker supports --as-needed and --no-as-needed options.
+ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
+ 	[bfd_cv_ld_as_needed=no
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index ceff2c1cacc..93015305587 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -2155,7 +2155,7 @@ log_header_write (sp_origin_t origin)
+   ucontext_t ucp;
+   ucp.uc_stack.ss_sp = NULL;
+   ucp.uc_stack.ss_size = 0;
+-  if (getcontext (&ucp) == 0)
++  if (CALL_UTIL (getcontext) (&ucp) == 0)
+     {
+       (void) __collector_log_write ("<process stackbase=\"0x%lx\"></process>\n",
+ 				    (unsigned long) ucp.uc_stack.ss_sp + ucp.uc_stack.ss_size);
+@@ -2413,10 +2413,9 @@ __collector_dlog (int tflag, int level, char *format, ...)
+   int left = bufsz;
+   if ((tflag & SP_DUMP_NOHEADER) == 0)
+     {
+-      p += CALL_UTIL (snprintf)(p, left, "P%d,L%02u,t%02lu",
+-				(int) getpid (),
+-				(unsigned int) __collector_lwp_self (),
+-				__collector_no_threads ? 0 : __collector_thr_self ());
++      p += CALL_UTIL (snprintf) (p, left, "P%ld,L%02lu,t%02lu",
++	 (long) getpid (), (unsigned long) __collector_lwp_self (),
++	 (unsigned long) (__collector_no_threads ? 0 : __collector_thr_self ()));
+       left = bufsz - (p - buf);
+       if (tflag)
+ 	{
+diff --git a/gprofng/libcollector/collector.h b/gprofng/libcollector/collector.h
+index c54568d891c..b589d3f3d18 100644
+--- a/gprofng/libcollector/collector.h
++++ b/gprofng/libcollector/collector.h
+@@ -21,7 +21,6 @@
+ #ifndef _COLLECTOR_H
+ #define _COLLECTOR_H
+ 
+-#include <ucontext.h>
+ #include <signal.h>
+ 
+ #include "gp-defs.h"
+@@ -31,6 +30,11 @@
+ 
+ #define GETRELTIME()    (__collector_gethrtime() - __collector_start_time)
+ 
++#if defined(__MUSL_LIBC)
++#define dlvsym(f, nm, v)  dlsym (f, nm)
++#define SIGEV_THREAD_ID   4
++#endif
++
+ extern hrtime_t __collector_start_time;
+ 
+ /* ========================================================== */
+diff --git a/gprofng/libcollector/dispatcher.c b/gprofng/libcollector/dispatcher.c
+index f0308605d76..d3e4c52d667 100644
+--- a/gprofng/libcollector/dispatcher.c
++++ b/gprofng/libcollector/dispatcher.c
+@@ -30,9 +30,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ucontext.h>
+ #include <sys/param.h>
+-#include <sys/signal.h>
+ #include <sys/syscall.h>
+ #include <time.h>
+ #include <signal.h>
+@@ -575,7 +573,9 @@ collector_timer_create (timer_t * ptimerid)
+   sigev.sigev_notify = SIGEV_THREAD_ID | SIGEV_SIGNAL;
+   sigev.sigev_signo = SIGPROF;
+   sigev.sigev_value.sival_ptr = ptimerid;
++#if !defined(__MUSL_LIBC)
+   sigev._sigev_un._tid = __collector_gettid ();
++#endif
+   if (CALL_REAL (timer_create)(CLOCK_THREAD_CPUTIME_ID, &sigev, ptimerid) == -1)
+     {
+       TprintfT (DBG_LT2, "collector_timer_settime() failed! errno=%d\n", errno);
+diff --git a/gprofng/libcollector/hwprofile.c b/gprofng/libcollector/hwprofile.c
+index 6fdaf1bd8ff..e360068ea30 100644
+--- a/gprofng/libcollector/hwprofile.c
++++ b/gprofng/libcollector/hwprofile.c
+@@ -29,7 +29,6 @@
+ #include <errno.h>
+ #include <sys/syscall.h>
+ #include <signal.h>
+-#include <ucontext.h>
+ 
+ #include "gp-defs.h"
+ #define _STRING_H 1  /* XXX MEZ: temporary workaround */
+@@ -378,23 +377,23 @@ static void
+ init_ucontexts (void)
+ {
+   /* initialize dummy context for "collector" frames */
+-  getcontext (&expr_dummy_uc);
++  CALL_UTIL (getcontext) (&expr_dummy_uc);
+   SETFUNCTIONCONTEXT (&expr_dummy_uc, NULL);
+ 
+   /* initialize dummy context for "out-of-range" frames */
+-  getcontext (&expr_out_of_range_uc);
++  CALL_UTIL (getcontext) (&expr_out_of_range_uc);
+   SETFUNCTIONCONTEXT (&expr_out_of_range_uc, &__collector_hwcs_out_of_range);
+ 
+   /* initialize dummy context for "frozen" frames */
+-  getcontext (&expr_frozen_uc);
++  CALL_UTIL (getcontext) (&expr_frozen_uc);
+   SETFUNCTIONCONTEXT (&expr_frozen_uc, &__collector_hwcs_frozen);
+ 
+   /* initialize dummy context for non-program-related frames */
+-  getcontext (&expr_nopc_uc);
++  CALL_UTIL (getcontext) (&expr_nopc_uc);
+   SETFUNCTIONCONTEXT (&expr_nopc_uc, &__collector_not_program_related);
+ 
+   /* initialize dummy context for lost-counts-related frames */
+-  getcontext (&expr_lostcounts_uc);
++  CALL_UTIL (getcontext) (&expr_lostcounts_uc);
+   SETFUNCTIONCONTEXT (&expr_lostcounts_uc, &__collector_hwc_samples_lost);
+ }
+ /* initialize the signal handler */
+diff --git a/gprofng/libcollector/iolib.c b/gprofng/libcollector/iolib.c
+index 6881f02fd30..861843c183d 100644
+--- a/gprofng/libcollector/iolib.c
++++ b/gprofng/libcollector/iolib.c
+@@ -243,16 +243,14 @@ __collector_create_handle (char *descp)
+     {
+       /* allocate our buffers in virtual memory */
+       /* later, we will remap buffers individually to the file */
+-      uint8_t *memory = (uint8_t*) CALL_UTIL (mmap64)(0,
+-						      (size_t) (NBUFS * blksz),
+-						      PROT_READ | PROT_WRITE,
++      uint8_t *memory = (uint8_t*) CALL_UTIL (mmap64_) (0,
++	      (size_t) (NBUFS * blksz), PROT_READ | PROT_WRITE,
+ #if ARCH(SPARC)
+ 	      MAP_SHARED | MAP_ANON,
+ #else
+ 	      MAP_PRIVATE | MAP_ANON,
+ #endif
+-	      -1,
+-						      (off64_t) 0);
++	      -1, (off64_t) 0);
+       if (memory == MAP_FAILED)
+ 	{
+ 	  TprintfT (0, "create_handle: can't mmap MAP_ANON (for %s): %s\n", hndl->fname, CALL_UTIL (strerror)(errno));
+@@ -516,9 +514,8 @@ allocateChunk (DataHandle *hndl, unsigned ichunk)
+       if (__collector_cas_ptr (&hndl->chunks[ichunk], NULL, CHUNK_BUSY) == NULL)
+ 	{
+ 	  /* allocate virtual memory */
+-	  uint8_t *newchunk = (uint8_t*) CALL_UTIL (mmap64)(0,
+-							    (size_t) (blksz * hndl->nflow),
+-							    PROT_READ | PROT_WRITE,
++	  uint8_t *newchunk = (uint8_t*) CALL_UTIL (mmap64_) (0,
++		  (size_t) (blksz * hndl->nflow), PROT_READ | PROT_WRITE,
+ #if ARCH(SPARC)
+ 		  MAP_SHARED | MAP_ANON,
+ #else
+@@ -611,8 +608,10 @@ remapBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
+ 		  char errmsg[MAXPATHLEN + 50];
+ 		  hrtime_t teo = __collector_gethrtime ();
+ 		  double deltato = (double) (teo - tso) / 1000000.;
+-		  (void) CALL_UTIL (snprintf) (errmsg, sizeof (errmsg), " t=%d, %s: open-retries-failed = %d, %3.6f ms.; remap",
+-					       __collector_thr_self (), hndl->fname, iter, deltato);
++		  (void) CALL_UTIL (snprintf) (errmsg, sizeof (errmsg),
++			" t=%lu, %s: open-retries-failed=%d, %3.6f ms.; remap\n",
++			(unsigned long) __collector_thr_self (), hndl->fname,
++			iter, deltato);
+ 		  __collector_log_write ("<event kind=\"%s\" id=\"%d\">%s</event>\n",
+ 					 SP_JCMD_COMMENT, COL_COMMENT_NONE, errmsg);
+ 		  rc = 1;
+@@ -623,9 +622,9 @@ remapBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
+ 	    }
+ 	  deleteHandle (hndl);
+ 	  TprintfT (0, "remapBlock: can't open file: %s: %s\n", hndl->fname, STR (CALL_UTIL (strerror)(errno)));
+-	  __collector_log_write ("<event kind=\"%s\" id=\"%d\" ec=\"%d\">t=%llu, %s: remap </event>\n",
++	  __collector_log_write ("<event kind=\"%s\" id=\"%d\" ec=\"%d\">t=%lu, %s: remap </event>\n",
+ 				 SP_JCMD_CERROR, COL_ERROR_FILEOPN, errno,
+-				 (unsigned long long) __collector_thr_self (),
++				 (unsigned long) __collector_thr_self (),
+ 				 hndl->fname);
+ 	  rc = 1;
+ 	  goto exit;
+@@ -640,15 +639,18 @@ remapBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
+       char errmsg[MAXPATHLEN + 50];
+       hrtime_t teo = __collector_gethrtime ();
+       double deltato = (double) (teo - tso) / 1000000.;
+-      (void) CALL_UTIL (snprintf) (errmsg, sizeof (errmsg), " t=%d, %s: open-retries = %d, %3.6f ms.; remap",
+-				   __collector_thr_self (), hndl->fname, iter, deltato);
++      (void) CALL_UTIL (snprintf) (errmsg, sizeof (errmsg),
++	      " t=%d, %s: open-retries=%lu, %3.6f ms.; remap\n",
++	      (unsigned long) __collector_thr_self (), hndl->fname,
++	      iter, deltato);
+       __collector_log_write ("<event kind=\"%s\" id=\"%d\">%s</event>\n",
+ 			     SP_JCMD_COMMENT, COL_COMMENT_NONE, errmsg);
+     }
+ 
+   /* Ensure disk space is allocated and the block offset is 0 */
+   uint32_t zero = 0;
+-  int n = CALL_UTIL (pwrite64)(fd, &zero, sizeof (zero), (off64_t) (offset + blksz - sizeof (zero)));
++  int n = CALL_UTIL (pwrite64_) (fd, &zero, sizeof (zero),
++				(off64_t) (offset + blksz - sizeof (zero)));
+   if (n <= 0)
+     {
+       deleteHandle (hndl);
+@@ -663,13 +665,9 @@ remapBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
+ 
+   /* Map block to file */
+   uint8_t *bptr = getBlock (hndl, iflow, ichunk);
+-  uint8_t *vaddr = (uint8_t *) CALL_UTIL (mmap64)(
+-						  (void*) bptr,
+-						  (size_t) blksz,
+-						  PROT_READ | PROT_WRITE,
+-						  MAP_SHARED | MAP_FIXED,
+-						  fd,
+-						  offset);
++  uint8_t *vaddr = (uint8_t *) CALL_UTIL (mmap64_) ((void*) bptr,
++	  (size_t) blksz, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED,
++	  fd, offset);
+ 
+   if (vaddr != bptr)
+     {
+@@ -784,8 +782,9 @@ __collector_write_packet (DataHandle *hndl, CM_Packet *pckt)
+       TprintfT (0, "collector_write_packet: packet too long: %d (max %ld)\n", recsz, blksz);
+       return 1;
+     }
+-  unsigned tid = (__collector_no_threads ? __collector_lwp_self () : __collector_thr_self ());
+-  unsigned iflow = tid % hndl->nflow;
++  collector_thread_t tid = __collector_no_threads ? __collector_lwp_self ()
++						  : __collector_thr_self ();
++  unsigned iflow = (unsigned) (((unsigned long) tid) % hndl->nflow);
+ 
+   /* Acquire block */
+   uint32_t *sptr = &hndl->blkstate[iflow * NCHUNKS];
+@@ -925,7 +924,8 @@ mapBuffer (char *fname, Buffer *buf, off64_t foff)
+ 
+   /* ensure disk space is allocated */
+   char nl = '\n';
+-  int n = CALL_UTIL (pwrite64)(fd, &nl, sizeof (nl), (off64_t) (foff + blksz - sizeof (nl)));
++  int n = CALL_UTIL (pwrite64_) (fd, &nl, sizeof (nl),
++				 (off64_t) (foff + blksz - sizeof (nl)));
+   if (n <= 0)
+     {
+       TprintfT (0, "mapBuffer ERROR: can't pwrite file %s at 0x%llx\n", fname,
+@@ -937,7 +937,7 @@ mapBuffer (char *fname, Buffer *buf, off64_t foff)
+       goto exit;
+     }
+   /* mmap buf->vaddr to fname at foff */
+-  uint8_t *vaddr = CALL_UTIL (mmap64)(buf->vaddr, (size_t) blksz,
++  uint8_t *vaddr = CALL_UTIL (mmap64_) (buf->vaddr, (size_t) blksz,
+ 	  PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd, foff);
+   if (vaddr != buf->vaddr)
+     {
+diff --git a/gprofng/libcollector/iotrace.c b/gprofng/libcollector/iotrace.c
+index 9b47724bab9..d94daefa89b 100644
+--- a/gprofng/libcollector/iotrace.c
++++ b/gprofng/libcollector/iotrace.c
+@@ -34,7 +34,7 @@
+ #include <fcntl.h>
+ 
+ #include "gp-defs.h"
+-#include "collector_module.h"
++#include "collector.h"
+ #include "gp-experiment.h"
+ #include "data_pckts.h"
+ #include "tsd.h"
+@@ -999,6 +999,22 @@ init_io_intf ()
+   return rc;
+ }
+ 
++static void
++write_io_packet (int fd, ssize_t ret, hrtime_t reqt, int iotype)
++{
++  IOTrace_packet iopkt;
++  collector_memset (&iopkt, 0, sizeof ( IOTrace_packet));
++  iopkt.comm.tsize = sizeof (IOTrace_packet);
++  iopkt.comm.tstamp = gethrtime ();
++  iopkt.requested = reqt;
++  iopkt.iotype = iotype;
++  iopkt.fd = fd;
++  iopkt.nbyte = ret;
++  iopkt.comm.frinfo = collector_interface->getFrameInfo (io_hndl,
++			iopkt.comm.tstamp, FRINFO_FROM_STACK, &iopkt);
++  collector_interface->writeDataRecord (io_hndl, (Common_packet*) & iopkt);
++}
++
+ /*------------------------------------------------------------- open */
+ int
+ open (const char *path, int oflag, ...)
+@@ -2412,162 +2428,147 @@ pread (int fildes, void *buf, size_t nbyte, off_t offset)
+ }
+ 
+ /*------------------------------------------------------------- pwrite */
+-#if ARCH(Intel) && WSIZE(32)
++
++#if !defined(__MUSL_LIBC) && ARCH(Intel) && WSIZE(32)
+ // map interposed symbol versions
+-static int
+-__collector_pwrite_symver (int(real_pwrite) (), int fildes, const void *buf, size_t nbyte, off_t offset);
+ 
+ SYMVER_ATTRIBUTE (__collector_pwrite_2_2, pwrite@@GLIBC_2.2)
+ int
+ __collector_pwrite_2_2 (int fildes, const void *buf, size_t nbyte, off_t offset)
+ {
+-  TprintfT (DBG_LTT, "iotrace: __collector_pwrite_2_2@%p(fildes=%d, buf=%p, nbyte=%lld, offset=%lld)\n",
+-	    CALL_REAL (pwrite_2_2), fildes, buf, (long long) nbyte, (long long) offset);
+-  if (NULL_PTR (pwrite))
++  int *guard;
++  if (NULL_PTR (pwrite_2_2))
+     init_io_intf ();
+-  return __collector_pwrite_symver (CALL_REAL (pwrite_2_2), fildes, buf, nbyte, offset);
++  if (CHCK_REENTRANCE (guard))
++    return CALL_REAL (pwrite_2_2)(fildes, buf, nbyte, offset);
++  PUSH_REENTRANCE (guard);
++  hrtime_t reqt = gethrtime ();
++  ssize_t ret = CALL_REAL (pwrite_2_2)(fildes, buf, nbyte, offset);
++  if (RECHCK_REENTRANCE (guard))
++    {
++      POP_REENTRANCE (guard);
++      return ret;
++    }
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
++  POP_REENTRANCE (guard);
++  return ret;
+ }
+ 
+ SYMVER_ATTRIBUTE (__collector_pwrite_2_1, pwrite@GLIBC_2.1)
+ int
+ __collector_pwrite_2_1 (int fildes, const void *buf, size_t nbyte, off_t offset)
+ {
+-  TprintfT (DBG_LTT, "iotrace: __collector_pwrite_2_1@%p(fildes=%d, buf=%p, nbyte=%lld, offset=%lld)\n",
+-	    CALL_REAL (pwrite_2_1), fildes, buf, (long long) nbyte, (long long) offset);
+-  if (NULL_PTR (pwrite))
++  int *guard;
++  if (NULL_PTR (pwrite_2_1))
+     init_io_intf ();
+-  return __collector_pwrite_symver (CALL_REAL (pwrite_2_1), fildes, buf, nbyte, offset);
++  if (CHCK_REENTRANCE (guard))
++    return CALL_REAL (pwrite_2_1)(fildes, buf, nbyte, offset);
++  PUSH_REENTRANCE (guard);
++  hrtime_t reqt = gethrtime ();
++  ssize_t ret = CALL_REAL (pwrite_2_1)(fildes, buf, nbyte, offset);
++  if (RECHCK_REENTRANCE (guard))
++    {
++      POP_REENTRANCE (guard);
++      return ret;
++    }
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
++  POP_REENTRANCE (guard);
++  return ret;
+ }
+-
+-static int
+-__collector_pwrite_symver (int(real_pwrite) (), int fildes, const void *buf, size_t nbyte, off_t offset)
+-{
+-#else /* ^ARCH(Intel) && WSIZE(32) */
++#endif /* !defined(__MUSL_LIBC) && ARCH(Intel) && WSIZE(32) */
+ 
+ ssize_t
+ pwrite (int fildes, const void *buf, size_t nbyte, off_t offset)
+ {
+-#endif /* ^ARCH(Intel) && WSIZE(32) */
+   int *guard;
+-  ssize_t ret;
+-  IOTrace_packet iopkt;
+   if (NULL_PTR (pwrite))
+     init_io_intf ();
+   if (CHCK_REENTRANCE (guard))
+-    {
+-#if ARCH(Intel) && WSIZE(32)
+-      return (real_pwrite) (fildes, buf, nbyte, offset);
+-#else
+-      return CALL_REAL (pwrite)(fildes, buf, nbyte, offset);
+-#endif
+-    }
++    return CALL_REAL (pwrite)(fildes, buf, nbyte, offset);
+   PUSH_REENTRANCE (guard);
+   hrtime_t reqt = gethrtime ();
+-#if ARCH(Intel) && WSIZE(32)
+-  ret = (real_pwrite) (fildes, buf, nbyte, offset);
+-#else
+-  ret = CALL_REAL (pwrite)(fildes, buf, nbyte, offset);
+-#endif
++  ssize_t ret = CALL_REAL (pwrite)(fildes, buf, nbyte, offset);
+   if (RECHCK_REENTRANCE (guard))
+     {
+       POP_REENTRANCE (guard);
+       return ret;
+     }
+-  hrtime_t grnt = gethrtime ();
+-  collector_memset (&iopkt, 0, sizeof ( IOTrace_packet));
+-  iopkt.comm.tsize = sizeof ( IOTrace_packet);
+-  iopkt.comm.tstamp = grnt;
+-  iopkt.requested = reqt;
+-  if (ret >= 0)
+-    iopkt.iotype = WRITE_TRACE;
+-  else
+-    iopkt.iotype = WRITE_TRACE_ERROR;
+-  iopkt.fd = fildes;
+-  iopkt.nbyte = ret;
+-  iopkt.comm.frinfo = collector_interface->getFrameInfo (io_hndl, iopkt.comm.tstamp, FRINFO_FROM_STACK, &iopkt);
+-  collector_interface->writeDataRecord (io_hndl, (Common_packet*) & iopkt);
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
+   POP_REENTRANCE (guard);
+   return ret;
+ }
+ 
+ /*------------------------------------------------------------- pwrite64 */
++#if !defined(__MUSL_LIBC)
+ #if ARCH(Intel) && WSIZE(32)
+ // map interposed symbol versions
+-static int
+-__collector_pwrite64_symver (int(real_pwrite64) (), int fildes, const void *buf, size_t nbyte, off64_t offset);
+ 
+ SYMVER_ATTRIBUTE (__collector_pwrite64_2_2, pwrite64@@GLIBC_2.2)
+-int
++ssize_t
+ __collector_pwrite64_2_2 (int fildes, const void *buf, size_t nbyte, off64_t offset)
+ {
+-  TprintfT (DBG_LTT, "iotrace: __collector_pwrite64_2_2@%p(fildes=%d, buf=%p, nbyte=%lld, offset=%lld)\n",
+-	    CALL_REAL (pwrite64_2_2), fildes, buf, (long long) nbyte, (long long) offset);
+-  if (NULL_PTR (pwrite64))
++  int *guard;
++  if (NULL_PTR (pwrite64_2_2))
+     init_io_intf ();
+-  return __collector_pwrite64_symver (CALL_REAL (pwrite64_2_2), fildes, buf, nbyte, offset);
++  if (CHCK_REENTRANCE (guard))
++    return CALL_REAL (pwrite64_2_2)(fildes, buf, nbyte, offset);
++  PUSH_REENTRANCE (guard);
++  hrtime_t reqt = gethrtime ();
++  ssize_t ret = CALL_REAL (pwrite64_2_2)(fildes, buf, nbyte, offset);
++  if (RECHCK_REENTRANCE (guard))
++    {
++      POP_REENTRANCE (guard);
++      return ret;
++    }
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
++  POP_REENTRANCE (guard);
++  return ret;
+ }
+ 
+ SYMVER_ATTRIBUTE (__collector_pwrite64_2_1, pwrite64@GLIBC_2.1)
+ int
+ __collector_pwrite64_2_1 (int fildes, const void *buf, size_t nbyte, off64_t offset)
+ {
+-  TprintfT (DBG_LTT, "iotrace: __collector_pwrite64_2_1@%p(fildes=%d, buf=%p, nbyte=%lld, offset=%lld)\n",
+-	    CALL_REAL (pwrite64_2_1), fildes, buf, (long long) nbyte, (long long) offset);
+-  if (NULL_PTR (pwrite64))
++  int *guard;
++  if (NULL_PTR (pwrite64_2_1))
+     init_io_intf ();
+-  return __collector_pwrite64_symver (CALL_REAL (pwrite64_2_1), fildes, buf, nbyte, offset);
++  if (CHCK_REENTRANCE (guard))
++    return CALL_REAL (pwrite64_2_1)(fildes, buf, nbyte, offset);
++  PUSH_REENTRANCE (guard);
++  hrtime_t reqt = gethrtime ();
++  ssize_t ret = CALL_REAL (pwrite64_2_1)(fildes, buf, nbyte, offset);
++  if (RECHCK_REENTRANCE (guard))
++    {
++      POP_REENTRANCE (guard);
++      return ret;
++    }
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
++  POP_REENTRANCE (guard);
++  return ret;
+ }
+-
+-static int
+-__collector_pwrite64_symver (int(real_pwrite64) (), int fildes, const void *buf, size_t nbyte, off64_t offset)
+-{
+-#else /* ^ARCH(Intel) && WSIZE(32) */
++#endif
+ 
+ ssize_t
+ pwrite64 (int fildes, const void *buf, size_t nbyte, off64_t offset)
+ {
+-#endif /* ^ARCH(Intel) && WSIZE(32) */
+   int *guard;
+-  ssize_t ret;
+-  IOTrace_packet iopkt;
+   if (NULL_PTR (pwrite64))
+     init_io_intf ();
+   if (CHCK_REENTRANCE (guard))
+-    {
+-#if ARCH(Intel) && WSIZE(32)
+-      return (real_pwrite64) (fildes, buf, nbyte, offset);
+-#else
+-      return CALL_REAL (pwrite64)(fildes, buf, nbyte, offset);
+-#endif
+-    }
++    return CALL_REAL (pwrite64)(fildes, buf, nbyte, offset);
+   PUSH_REENTRANCE (guard);
+   hrtime_t reqt = gethrtime ();
+-#if ARCH(Intel) && WSIZE(32)
+-  ret = (real_pwrite64) (fildes, buf, nbyte, offset);
+-#else
+-  ret = CALL_REAL (pwrite64)(fildes, buf, nbyte, offset);
+-#endif
++  ssize_t ret = CALL_REAL (pwrite64)(fildes, buf, nbyte, offset);
+   if (RECHCK_REENTRANCE (guard))
+     {
+       POP_REENTRANCE (guard);
+       return ret;
+     }
+-  hrtime_t grnt = gethrtime ();
+-  collector_memset (&iopkt, 0, sizeof ( IOTrace_packet));
+-  iopkt.comm.tsize = sizeof ( IOTrace_packet);
+-  iopkt.comm.tstamp = grnt;
+-  iopkt.requested = reqt;
+-  if (ret >= 0)
+-    iopkt.iotype = WRITE_TRACE;
+-  else
+-    iopkt.iotype = WRITE_TRACE_ERROR;
+-  iopkt.fd = fildes;
+-  iopkt.nbyte = ret;
+-  iopkt.comm.frinfo = collector_interface->getFrameInfo (io_hndl, iopkt.comm.tstamp, FRINFO_FROM_STACK, &iopkt);
+-  collector_interface->writeDataRecord (io_hndl, (Common_packet*) & iopkt);
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
+   POP_REENTRANCE (guard);
+   return ret;
+ }
++#endif
+ 
+ /*------------------------------------------------------------- fgets */
+ char*
+diff --git a/gprofng/libcollector/jprofile.c b/gprofng/libcollector/jprofile.c
+index 9daaa5a267e..52114066726 100644
+--- a/gprofng/libcollector/jprofile.c
++++ b/gprofng/libcollector/jprofile.c
+@@ -285,12 +285,6 @@ __collector_jprofile_start_attach (void)
+ 	    {
+ 	      jthread thread;
+ 	      (*jvmti)->GetCurrentThread (jvmti, &thread);
+-#ifdef DEBUG
+-	      collector_thread_t tid;
+-	      tid = __collector_thr_self ();
+-	      TprintfT (0, "jprofile attach: AttachCurrentThread: thread: %lu jni_env=%p jthread=%p\n",
+-			(unsigned long) tid, jni_env, thread);
+-#endif /* DEBUG */
+ 	      jvmti_VMInit (jvmti, jni_env, thread);
+ 	      (*jvmti)->GenerateEvents (jvmti, JVMTI_EVENT_COMPILED_METHOD_LOAD);
+ 	      (*jvmti)->GenerateEvents (jvmti, JVMTI_EVENT_DYNAMIC_CODE_GENERATED);
+diff --git a/gprofng/libcollector/libcol_util.c b/gprofng/libcollector/libcol_util.c
+index c709b3c5ed1..d682aa0ab29 100644
+--- a/gprofng/libcollector/libcol_util.c
++++ b/gprofng/libcollector/libcol_util.c
+@@ -1116,9 +1116,9 @@ __collector_util_init ()
+   /*    internal calls for mapping in libcollector call mmap64 */
+   ptr = dlsym (libc, "mmap64");
+   if (ptr)
+-    __collector_util_funcs.mmap64 = (void*(*)(void *, size_t, int, int, int, off_t))ptr;
++    __collector_util_funcs.mmap64_ = (void*(*)(void *, size_t, int, int, int, off_t))ptr;
+   else
+-    __collector_util_funcs.mmap64 = __collector_util_funcs.mmap;
++    __collector_util_funcs.mmap64_ = __collector_util_funcs.mmap;
+ 
+   ptr = dlsym (libc, "munmap");
+   if (ptr)
+@@ -1214,16 +1214,16 @@ __collector_util_init ()
+ #if ARCH(Intel) && WSIZE(32)
+   ptr = dlvsym (libc, "pwrite64", "GLIBC_2.2"); // it is in /lib/libpthread.so.0
+   if (ptr)
+-    __collector_util_funcs.pwrite64 = (ssize_t (*)())ptr;
++    __collector_util_funcs.pwrite64_ = (ssize_t (*)())ptr;
+   else
+     {
+       Tprintf (DBG_LT0, "libcol_util: WARNING: dlvsym for %s@%s failed. Using dlsym() instead.", "pwrite64", "GLIBC_2.2");
+ #endif /* ARCH(Intel) && WSIZE(32) */
+       ptr = dlsym (libc, "pwrite64");
+       if (ptr)
+-	__collector_util_funcs.pwrite64 = (ssize_t (*)())ptr;
++	__collector_util_funcs.pwrite64_ = (ssize_t (*)())ptr;
+       else
+-	__collector_util_funcs.pwrite64 = __collector_util_funcs.pwrite;
++	__collector_util_funcs.pwrite64_ = __collector_util_funcs.pwrite;
+ #if ARCH(Intel) && WSIZE(32)
+     }
+ #endif /* ARCH(Intel) && WSIZE(32) */
+@@ -1319,6 +1319,15 @@ __collector_util_init ()
+   __collector_util_funcs.getcpuid = __collector_getcpuid;
+   __collector_util_funcs.memset = collector_memset;
+ 
++  ptr = dlsym (libc, "getcontext");
++  if (ptr)
++    __collector_util_funcs.getcontext = (int(*)())ptr;
++  else
++    {
++      CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT getcontext: %s\n", dlerror ());
++      err = COL_ERROR_UTIL_INIT;
++    }
++
+   ptr = dlsym (libc, "malloc");
+   if (ptr)
+     __collector_util_funcs.malloc = (void *(*)(size_t))ptr;
+diff --git a/gprofng/libcollector/libcol_util.h b/gprofng/libcollector/libcol_util.h
+index e13a02ea6d7..c32c76f091b 100644
+--- a/gprofng/libcollector/libcol_util.h
++++ b/gprofng/libcollector/libcol_util.h
+@@ -59,12 +59,11 @@ extern int __collector_xml_snprintf (char *s, size_t n, const char *format, ...)
+ extern int __collector_xml_vsnprintf (char *s, size_t n, const char *format, va_list args);
+ 
+ /* -------  collector_thread ----------------- */
+-pid_t __collector_gettid ();
++extern pid_t __collector_gettid ();
+ extern void __collector_ext_gettid_tsd_create_key ();
+-#define collector_thread_t pthread_t            // not using pid_t, since tid is defined as pthread_t in package structures, and other codes assume this type
+-#define statvfs_t  struct statvfs
+-#define __collector_lwp_self() (collector_thread_t)__collector_gettid() // not using pthread_self()
+-#define __collector_thr_self() (collector_thread_t)__collector_gettid() // not using pthread_self()
++typedef pthread_t collector_thread_t;
++#define __collector_lwp_self() ((collector_thread_t) ((unsigned long) __collector_gettid()))
++#define __collector_thr_self() ((collector_thread_t) ((unsigned long) __collector_gettid()))
+ 
+ /* -------  collector_mutex ----------------- */
+ /*
+diff --git a/gprofng/libcollector/linetrace.c b/gprofng/libcollector/linetrace.c
+index 978c5503e2e..a209308c767 100644
+--- a/gprofng/libcollector/linetrace.c
++++ b/gprofng/libcollector/linetrace.c
+@@ -29,6 +29,8 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
++#include <limits.h>
++
+ 
+ #include "descendants.h"
+ 
+@@ -360,7 +362,7 @@ check_fd_dynamic (int fd)
+   size_t sz = (size_t) 8192; /* one page should suffice */
+   if (sz > off)
+     sz = off;
+-  char *p = CALL_UTIL (mmap64)((char *) 0, sz, PROT_READ, MAP_PRIVATE, fd, (off64_t) 0);
++  char *p = CALL_UTIL (mmap64_)((char *) 0, sz, PROT_READ, MAP_PRIVATE, fd, (off64_t) 0);
+   if (p == MAP_FAILED)
+     {
+       TprintfT (DBG_LT0, "check_fd_dynamic(): ERROR/WARNING: mmap failed for `%d'\n", fd);
+diff --git a/gprofng/libcollector/memmgr.c b/gprofng/libcollector/memmgr.c
+index 5ada421f3f4..aa13ea77852 100644
+--- a/gprofng/libcollector/memmgr.c
++++ b/gprofng/libcollector/memmgr.c
+@@ -131,7 +131,7 @@ alloc_chunk (unsigned sz, int log)
+   if (log == 1)
+     Tprintf (DBG_LT2, "alloc_chunk mapping %u, rounded up from %u\n", (unsigned int) chunksz, sz);
+   /* mmap64 is only in 32-bits; this call goes to mmap in 64-bits */
+-  ptr = (char*) CALL_UTIL (mmap64)(0, chunksz, PROT_READ | PROT_WRITE,
++  ptr = (char*) CALL_UTIL (mmap64_)(0, chunksz, PROT_READ | PROT_WRITE,
+ 				   MAP_PRIVATE | MAP_ANON, (int) -1, (off64_t) 0);
+   if (ptr == MAP_FAILED)
+     {
+diff --git a/gprofng/libcollector/mmaptrace.c b/gprofng/libcollector/mmaptrace.c
+index ba5c9129f4c..bd299e6f64f 100644
+--- a/gprofng/libcollector/mmaptrace.c
++++ b/gprofng/libcollector/mmaptrace.c
+@@ -441,13 +441,9 @@ checksum_mapname (MapInfo* map)
+ }
+ 
+ 
+-#if (ARCH(Intel) && WSIZE(32)) || ARCH(SPARC)
+-static void*
+-dlopen_searchpath_symver (void*(real_dlopen) (), void* caller_addr, const char* basename, int mode)
+-#else
+ static void*
+-dlopen_searchpath (void* caller_addr, const char* basename, int mode)
+-#endif
++dlopen_searchpath (void*(real_dlopen) (const char *, int),
++		void *caller_addr, const char *basename, int mode)
+ {
+   TprintfT (DBG_LT2, "dlopen_searchpath(%p, %s, %d)\n", caller_addr, basename, mode);
+   Dl_info dl_info;
+@@ -458,7 +454,8 @@ dlopen_searchpath (void* caller_addr, const char* basename, int mode)
+     }
+   TprintfT (DBG_LT2, "dladdr(%p): %p fname=%s\n",
+ 	    caller_addr, dl_info.dli_fbase, dl_info.dli_fname);
+-  int noload = RTLD_BINDING_MASK | RTLD_NOLOAD; //XXXX why RTLD_BINDING_MASK?
++  int noload = RTLD_LAZY | RTLD_NOW | RTLD_NOLOAD;
++  void *caller_hndl = NULL;
+ #define WORKAROUND_RTLD_BUG 1
+ #ifdef WORKAROUND_RTLD_BUG
+   // A dynamic linker dlopen bug can result in corruption/closure of open streams
+@@ -470,29 +467,20 @@ dlopen_searchpath (void* caller_addr, const char* basename, int mode)
+ #endif
+   const char* tmp_path =
+ 	  (dl_info.dli_fbase == (void*) MAINBASE) ? NULL : dl_info.dli_fname;
+-  void* caller_hndl = NULL;
+-#if ((ARCH(Intel) && WSIZE(32)) || ARCH(SPARC))
+-  caller_hndl = (real_dlopen) (tmp_path, noload);
+-#else
+-  caller_hndl = CALL_REAL (dlopen)(tmp_path, noload);
+-#endif
++  caller_hndl = real_dlopen (tmp_path, noload);
+ 
+ #else //XXXX workaround should be removed once linker patches are all available
+ 
+-  void* caller_hndl = NULL;
+-#if (ARCH(Intel) && WSIZE(32) || ARCH(SPARC)
+-  caller_hndl = (real_dlopen) (dl_info.dli_fname, noload);
+-#else
+-  caller_hndl = CALL_REAL (dlopen)(dl_info.dli_fname, noload);
+-#endif
++  caller_hndl = real_dlopen (dl_info.dli_fname, noload);
+ 
+ #endif //XXXX workaround should be removed once linker patches are all available
+ 
+   if (!caller_hndl)
+     {
+       TprintfT (0, "ERROR: dlopen(%s,NOLOAD): %s\n", dl_info.dli_fname, dlerror ());
+-      return 0;
++      return NULL;
+     }
++#if !defined(__MUSL_LIBC)
+   Dl_serinfo _info, *info = &_info;
+   Dl_serpath *path;
+ 
+@@ -546,7 +534,7 @@ dlopen_searchpath (void* caller_addr, const char* basename, int mode)
+       I have already confirmed with our user that the workaround
+       is working with his real application. Additionally,
+       the dlopen_searchpath() function is called only by the
+-      libcorrector init() function when the experiment is started.
++      libcollector init() function when the experiment is started.
+       Therefore, allocating some extra bytes on the stack which
+       is local to this routine is harmless.
+    */
+@@ -575,7 +563,8 @@ dlopen_searchpath (void* caller_addr, const char* basename, int mode)
+       if (ret)
+ 	return ret; // success!
+     }
+-  return 0;
++#endif
++  return NULL;
+ }
+ 
+ static void
+@@ -1550,40 +1539,9 @@ munmap (void *start, size_t length)
+ 
+ 
+ /*------------------------------------------------------------- dlopen */
+-// map interposed symbol versions
+-#if (ARCH(Intel) && WSIZE(32)) || ARCH(SPARC)
+-
+-static void *
+-__collector_dlopen_symver (void*(real_dlopen) (), void *caller, const char *pathname, int mode);
+-
+-SYMVER_ATTRIBUTE (__collector_dlopen_2_1, dlopen@@GLIBC_2.1)
+-void *
+-__collector_dlopen_2_1 (const char *pathname, int mode)
+-{
+-  if (NULL_PTR (dlopen))
+-    init_mmap_intf ();
+-  void *caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
+-  return __collector_dlopen_symver (CALL_REAL (dlopen_2_1), caller, pathname, mode);
+-}
+-
+-SYMVER_ATTRIBUTE (__collector_dlopen_2_0, dlopen@GLIBC_2.0)
+-void *
+-__collector_dlopen_2_0 (const char *pathname, int mode)
+-{
+-  if (NULL_PTR (dlopen))
+-    init_mmap_intf ();
+-  void* caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
+-  return __collector_dlopen_symver (CALL_REAL (dlopen_2_0), caller, pathname, mode);
+-}
+-#endif
+-
+-#if (ARCH(Intel) && WSIZE(32)) || ARCH(SPARC)
+ static void *
+-__collector_dlopen_symver (void*(real_dlopen) (), void *caller, const char *pathname, int mode)
+-#else
+-void *
+-dlopen (const char *pathname, int mode)
+-#endif
++__collector_dlopen_symver (void*(real_dlopen) (const char *, int),
++			   void *caller, const char *pathname, int mode)
+ {
+   const char * real_pathname = pathname;
+   char new_pathname[MAXPATHLEN];
+@@ -1595,10 +1553,6 @@ dlopen (const char *pathname, int mode)
+     origin_offset = 10;
+   if (origin_offset)
+     {
+-#if ! ((ARCH(Intel) && WSIZE(32)) || ARCH(SPARC))
+-      // 'caller' is not passed as an argument
+-      void * caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
+-#endif
+       Dl_info dl_info;
+       if (caller && dladdr (caller, &dl_info) != 0)
+ 	{
+@@ -1619,37 +1573,18 @@ dlopen (const char *pathname, int mode)
+     init_mmap_intf ();
+   TprintfT (DBG_LT2, "libcollector.dlopen(%s,%d) interposing\n",
+ 	    pathname ? pathname : "", mode);
+-  void* ret = NULL;
++  void *ret = NULL;
+ 
+   // set guard for duration of handling dlopen, since want to ensure
+   // new mappings are resolved after the actual dlopen has occurred
+   PUSH_REENTRANCE;
+   hrtime_t hrt = GETRELTIME ();
+ 
+-  if (real_pathname && !__collector_strchr (real_pathname, '/'))
+-    { // got an unqualified name
+-      // get caller and use its searchpath
+-#if ! ((ARCH(Intel) && WSIZE(32)) || ARCH(SPARC))
+-      void* caller = __builtin_return_address (0); // must be called inside dlopen
+-#endif
+-      if (caller)
+-	{
+-#if (ARCH(Intel) && WSIZE(32)) || ARCH(SPARC)
+-	  ret = dlopen_searchpath_symver (real_dlopen, caller, real_pathname, mode);
+-#else
+-	  ret = dlopen_searchpath (caller, real_pathname, mode);
+-#endif
+-	}
+-    }
++  if (caller && real_pathname && !__collector_strchr (real_pathname, '/'))
++    ret = dlopen_searchpath (real_dlopen, caller, real_pathname, mode);
+ 
+   if (!ret)
+-    {
+-#if (ARCH(Intel) && WSIZE(32)) || ARCH(SPARC)
+-      ret = (real_dlopen) (real_pathname, mode);
+-#else
+-      ret = CALL_REAL (dlopen)(real_pathname, mode);
+-#endif
+-    }
++    ret = real_dlopen (real_pathname, mode);
+   TprintfT (DBG_LT2, "libcollector -- dlopen(%s) returning %p\n", pathname, ret);
+ 
+   /* Don't call update if dlopen failed: preserve dlerror() */
+@@ -1660,6 +1595,39 @@ dlopen (const char *pathname, int mode)
+   return ret;
+ }
+ 
++void *
++dlopen (const char *pathname, int mode)
++{
++  if (NULL_PTR (dlopen))
++    init_mmap_intf ();
++  void* caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
++  return __collector_dlopen_symver (CALL_REAL (dlopen), caller, pathname, mode);
++}
++
++#if !defined(__MUSL_LIBC) && ((ARCH(Intel) && WSIZE(32)) || ARCH(SPARC))
++// map interposed symbol versions
++
++SYMVER_ATTRIBUTE (__collector_dlopen_2_1, dlopen@@GLIBC_2.1)
++void *
++__collector_dlopen_2_1 (const char *pathname, int mode)
++{
++  if (NULL_PTR (dlopen_2_1))
++    init_mmap_intf ();
++  void *caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
++  return __collector_dlopen_symver (CALL_REAL (dlopen_2_1), caller, pathname, mode);
++}
++
++SYMVER_ATTRIBUTE (__collector_dlopen_2_0, dlopen@GLIBC_2.0)
++void *
++__collector_dlopen_2_0 (const char *pathname, int mode)
++{
++  if (NULL_PTR (dlopen_2_0))
++    init_mmap_intf ();
++  void* caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
++  return __collector_dlopen_symver (CALL_REAL (dlopen_2_0), caller, pathname, mode);
++}
++#endif
++
+ /*------------------------------------------------------------- dlclose */
+ int
+ dlclose (void *handle)
+diff --git a/gprofng/libcollector/profile.c b/gprofng/libcollector/profile.c
+index 996d3f09198..ee9fb7d3b0c 100644
+--- a/gprofng/libcollector/profile.c
++++ b/gprofng/libcollector/profile.c
+@@ -268,7 +268,7 @@ __collector_ext_profile_handler (siginfo_t *info, ucontext_t *context)
+       /* assume this case is rare, and accept overhead of creating dummy_uc */
+       TprintfT (0, "collector_profile_handler: ERROR: got NULL context!\n");
+       context = &uctxmem;
+-      getcontext (context);     /* initialize dummy context */
++      CALL_UTIL (getcontext) (context);     /* initialize dummy context */
+       SETFUNCTIONCONTEXT (context, &__collector_lost_profile_context);
+     }
+   ClockPacket pckt;
+diff --git a/gprofng/libcollector/synctrace.c b/gprofng/libcollector/synctrace.c
+index 492ef9993f7..d48aeaa2d2d 100644
+--- a/gprofng/libcollector/synctrace.c
++++ b/gprofng/libcollector/synctrace.c
+@@ -32,10 +32,9 @@
+ #include <pthread.h>
+ 
+ #include "gp-defs.h"
+-#include "collector_module.h"
++#include "collector.h"
+ #include "gp-experiment.h"
+ #include "data_pckts.h"
+-#include "i18n.h"
+ #include "tsd.h"
+ #include "cc_libcollector.h"
+ 
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index f8e11823c81..009b5ab8456 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -232,7 +232,7 @@ memory_error_func (int status ATTRIBUTE_UNUSED, bfd_vma addr ATTRIBUTE_UNUSED,
+ 
+ #elif ARCH(Aarch64)
+ #define FILL_CONTEXT(context) \
+-    { getcontext(context);  \
++    { CALL_UTIL (getcontext) (context);  \
+       context->uc_mcontext.sp = (__u64) __builtin_frame_address(0); \
+     }
+ 
+diff --git a/gprofng/src/Experiment.cc b/gprofng/src/Experiment.cc
+index c797724af07..98aae9714ac 100644
+--- a/gprofng/src/Experiment.cc
++++ b/gprofng/src/Experiment.cc
+@@ -6466,7 +6466,7 @@ int
+ Experiment::copy_file_to_archive (const char *name, const char *aname, int hide_msg)
+ {
+   errno = 0;
+-  int fd_w = open64 (aname, O_WRONLY | O_CREAT | O_EXCL, 0644);
++  int fd_w = ::open64 (aname, O_WRONLY | O_CREAT | O_EXCL, 0644);
+   if (fd_w == -1)
+     {
+       if (errno == EEXIST)
+@@ -6484,7 +6484,7 @@ Experiment::copy_file_to_archive (const char *name, const char *aname, int hide_
+       return 1;
+     }
+ 
+-  int fd_r = open64 (name, O_RDONLY);
++  int fd_r = ::open64 (name, O_RDONLY);
+   if (fd_r == -1)
+     {
+       fprintf (stderr, GTXT ("er_archive: unable to open `%s': %s\n"),
+diff --git a/gprofng/src/Print.cc b/gprofng/src/Print.cc
+index d415d591e1e..03932530956 100644
+--- a/gprofng/src/Print.cc
++++ b/gprofng/src/Print.cc
+@@ -2209,14 +2209,14 @@ print_anno_file (char *name, const char *sel, const char *srcFile,
+ 	    {
+ 	      fitem = func->getDefSrc ();
+ 	      found = (func->line_first > 0)
+-		      && strcmp (basename (srcFile),
+-				 basename (fitem->get_name ())) == 0;
++		      && strcmp (get_basename (srcFile),
++				 get_basename (fitem->get_name ())) == 0;
+ 	    }
+ 	  else
+ 	    {
+ 	      Vec_loop (SourceFile*, sources, index, fitem)
+ 	      {
+-		if (strcmp (basename (srcFile), basename (fitem->get_name ())) == 0)
++		if (strcmp (get_basename (srcFile), get_basename (fitem->get_name ())) == 0)
+ 		  {
+ 		    found = true;
+ 		    break;
+diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
+index f608dab5831..6cf53d5b27f 100644
+--- a/gprofng/src/collector_module.h
++++ b/gprofng/src/collector_module.h
+@@ -25,6 +25,7 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <unistd.h>
++#include <ucontext.h>
+ #include <dirent.h>
+ 
+ #include "gp-defs.h"
+@@ -55,6 +56,7 @@ typedef struct CollectorUtilFuncs
+   int (*fprintf)(FILE *stream, const char *format, ...);
+   void (*free)(void *ptr);
+   int (*fstat)(int fd, struct stat *buf);
++  int (*getcontext)(ucontext_t *ucp);
+   int (*getcpuid)();
+   char *(*getcwd)(char *buf, size_t size);
+   char *(*getenv)(const char *name);
+@@ -66,7 +68,7 @@ typedef struct CollectorUtilFuncs
+   int (*mkdir)();
+   time_t (*mktime)(struct tm *timeptr);
+   void *(*mmap)(void *, size_t, int, int, int, off_t);
+-  void *(*mmap64)();
++  void *(*mmap64_)();
+   int (*munmap)();
+   int (*open)(const char *, int, ...);
+   int (*open_bare)(const char *, int, ...);
+@@ -75,7 +77,7 @@ typedef struct CollectorUtilFuncs
+   FILE *(*popen)(const char *command, const char *mode);
+   int (*putenv)(char *string);
+   ssize_t (*pwrite)();
+-  ssize_t (*pwrite64)();
++  ssize_t (*pwrite64_)();
+   ssize_t (*read)();
+   int (*setenv)(const char *name, const char *value, int overwrite);
+   int (*sigfillset)(sigset_t *set);
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..256e627135b0 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64*|i386*|aarch64*) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From b42a30920c89e9c84932d55417c423c33503add9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 03/28] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From c2197721ecbea7c0dc8ed3d916f4e1acc3557826 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 04/28] build-style/void-cross: update flags for binutils 2.39

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

From d1a376d77cbe33779066c99ade59001493d36db2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 05/28] cross-aarch64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..8e76d5e3bdb2 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 04f17ef9e2adb4f6d31337ae10070c3810b89af8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 06/28] cross-aarch64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..cb2719bd3162 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 8d87124b74383d7b86d93b724c3476a396bd906d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 07/28] cross-arm-linux-gnueabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..e607cd4ca6e4 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From beebc0dc281142664d7295b873da91b459651dd8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 08/28] cross-arm-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..d4af41a7f994 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From e777e6e707a9f1f66a87e1a12d0c47fc9ba78424 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 09/28] cross-arm-linux-musleabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabi/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..a5294a229cc7 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 8938f43f3e96125f124d3ff88eccae4d35f32f8a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:55 -0700
Subject: [PATCH 10/28] cross-arm-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..e307aa153674 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From e513403704eec1cbbf8cd0c16e8c75b7320b829c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 11/28] cross-armv7l-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..2d7b5cb2983d 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From ade8a989c1ab637423ac1588293c538c109746e8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 12/28] cross-armv7l-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..e05b3835d6a3 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 882c4e7a825cdf1dd064b7fb289fb402e5189ab0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 13/28] cross-i686-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-i686-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..2b15505e04ff 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 2c17d8da948a92abe3eeaa560903cd35c6de2c2d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 14/28] cross-i686-pc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..06f6210a07f3 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 22fc371d6b3558d46c834ab0120f21f153f2d5d4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 15/28] cross-mips-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..8cd4abd1ddca 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From c6c24fff6ebd2ea37139ad2de102f04140e3ade8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 16/28] cross-mips-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..0b0fa564b75e 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="hipperson0 <hipperson0@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 68f3994aca8d9ebab5c5f21aa02f2b9748af073e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 17/28] cross-mipsel-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..d380bde73e7c 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 4199165231afeb8f08dff311cbaaf60f329d2a9b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 18/28] cross-mipsel-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..4b7e0d3c63a5 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 7d33dd81cf0d6dbe056a6a7643fadf329acf1b57 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 19/28] cross-powerpc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..bfc435703067 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 8bd29c7ac4f82150ba78e50fbd86cb0110c048bb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 20/28] cross-powerpc-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..f14ff19eee8d 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 50f2c6d7e3d5b714544ec511fd4a0861c0109ec5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 21/28] cross-powerpc64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..e77a194663f0 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"

From ca27b0189bd21dafa40c418610818ff8dbeb5562 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 22/28] cross-powerpc64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 016f18776a6d..99c5693b8fcb 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 16be72da5033eede8c9dada39fced9c555db666c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:56 -0700
Subject: [PATCH 23/28] cross-powerpc64le-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 463d7e92d20d..4c295a28f938 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"

From c695504a4160dc87c5dfdcfc521fcb82ed9eba07 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:57 -0700
Subject: [PATCH 24/28] cross-powerpc64le-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index c17a3cccfe29..06571aee41c1 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 089b547433972fe06b8cfe1857b63bd03225494d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:57 -0700
Subject: [PATCH 25/28] cross-powerpcle-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 9aede3c465ce..545a678406f6 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 59d770d09bc9ea8ec99ba5945eb494708d1c54b7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:57 -0700
Subject: [PATCH 26/28] cross-powerpcle-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index 045cfda987fe..db7a81ffe61f 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 211518768baa39f15abef7633a080ca2435a7917 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:57 -0700
Subject: [PATCH 27/28] cross-x86_64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 8918f3c22a1c..9d31bf5f674f 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 6240a87718cf9089037ebe449c9e3ae5430ad2cf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Sep 2022 17:26:57 -0700
Subject: [PATCH 28/28] cross-x86_64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..64f765893b53 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (17 preceding siblings ...)
  2022-09-25  1:12 ` oreo639
@ 2022-09-25  1:20 ` oreo639
  2022-09-25  1:43 ` oreo639
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-25  1:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2025 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 60599 bytes --]

From 229248a984026c0f22d4d05852d131a3224419b5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 1/4] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From d02fac824817608de5042679d2f6afaf25dbc22a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 2/4] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch |   60 -
 ...ffdc202f04397f31557f17170b40bc42b77a.patch | 1181 +++++++++++++++++
 .../fix-libcollector-without-java.patch       |   53 +
 .../patches/ppc64-revert-gnu-attributes.patch |   66 +-
 srcpkgs/binutils/template                     |   22 +-
 5 files changed, 1267 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fe39ffdc202f04397f31557f17170b40bc42b77a.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fe39ffdc202f04397f31557f17170b40bc42b77a.patch b/srcpkgs/binutils/patches/fe39ffdc202f04397f31557f17170b40bc42b77a.patch
new file mode 100644
index 000000000000..9ce0a8ff9d6d
--- /dev/null
+++ b/srcpkgs/binutils/patches/fe39ffdc202f04397f31557f17170b40bc42b77a.patch
@@ -0,0 +1,1181 @@
+From fe39ffdc202f04397f31557f17170b40bc42b77a Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 14 Sep 2022 01:11:45 -0700
+Subject: [PATCH] gprofng: fix build issues on musl
+
+gprofng/ChangeLog
+2022-09-14  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29477
+	* configure.ac: Set __MUSL_LIBC.
+	* configure: Rebuild.
+	* common/config.h.in: Rebuild.
+	* src/collector_module.h: Fix compiler errors because mmap64, open64,
+	pwrite64 are macros and getcontext() is absent on musl.
+	* libcollector/collector.c: Likewise.
+	* libcollector/hwprofile.c: Likewise.
+	* libcollector/iolib.c: Likewise.
+	* libcollector/libcol_util.c: Likewise.
+	* libcollector/linetrace.c: Likewise.
+	* libcollector/memmgr.c: Likewise.
+	* libcollector/profile.c: Likewise.
+	* libcollector/unwind.c: Likewise.
+	* libcollector/dispatcher.c: Likewise.
+	* src/Experiment.cc: Likewise.
+	* libcollector/collector.h: Use dlsym() because dlvsym() is not defined
+	on musl.
+	* libcollector/iotrace.c: Remove interposition of versioned functions.
+	* libcollector/mmaptrace.c: Likewise.
+	* libcollector/libcol_util.h: Fix -Wint-to-pointer-cast warnings.
+	* libcollector/jprofile.c: Likewise.
+	* libcollector/synctrace.c: Include "collector.h".
+	* src/Print.cc: Use get_basename() because basename() is not defined
+	on musl.
+	* common/hwcdrv.c: Fix -Wformat= warnings.
+---
+ gprofng/common/config.h.in         |   3 +
+ gprofng/common/hwcdrv.c            |   6 +-
+ gprofng/configure                  |  30 ++++-
+ gprofng/configure.ac               |  27 ++++-
+ gprofng/libcollector/collector.c   |   9 +-
+ gprofng/libcollector/collector.h   |   6 +-
+ gprofng/libcollector/dispatcher.c  |   4 +-
+ gprofng/libcollector/hwprofile.c   |  11 +-
+ gprofng/libcollector/iolib.c       |  52 ++++-----
+ gprofng/libcollector/iotrace.c     | 179 +++++++++++++++--------------
+ gprofng/libcollector/jprofile.c    |   6 -
+ gprofng/libcollector/libcol_util.c |  19 ++-
+ gprofng/libcollector/libcol_util.h |   9 +-
+ gprofng/libcollector/linetrace.c   |   4 +-
+ gprofng/libcollector/memmgr.c      |   2 +-
+ gprofng/libcollector/mmaptrace.c   | 132 ++++++++-------------
+ gprofng/libcollector/profile.c     |   2 +-
+ gprofng/libcollector/synctrace.c   |   3 +-
+ gprofng/libcollector/unwind.c      |   2 +-
+ gprofng/src/Experiment.cc          |   4 +-
+ gprofng/src/Print.cc               |   6 +-
+ gprofng/src/collector_module.h     |   6 +-
+ 22 files changed, 277 insertions(+), 245 deletions(-)
+
+diff --git a/gprofng/common/config.h.in b/gprofng/common/config.h.in
+index 8409ce74a57..f8484f238fd 100644
+--- a/gprofng/common/config.h.in
++++ b/gprofng/common/config.h.in
+@@ -118,3 +118,6 @@
+ 
+ /* Define to 1 if you need to in order for `stat' and other things to work. */
+ #undef _POSIX_SOURCE
++
++/* Build with musl-libc. */
++#undef __MUSL_LIBC
+diff --git a/gprofng/common/hwcdrv.c b/gprofng/common/hwcdrv.c
+index caab9839b49..05390e239df 100644
+--- a/gprofng/common/hwcdrv.c
++++ b/gprofng/common/hwcdrv.c
+@@ -440,7 +440,7 @@ typedef struct
+ { // per-thread context
+   counter_state_t *ctr_list;
+   int signal_fd;                // fd that caused the most recent signal
+-  pthread_t tid;                // for debugging signal delivery problems
++  pid_t tid;			// for debugging signal delivery problems
+ } hdrv_pcl_ctx_t;
+ 
+ /*---------------------------------------------------------------------------*/
+@@ -1321,7 +1321,7 @@ hwcdrv_free_counters () // note: only performs shutdown for this thread
+   for (int ii = 0; ii < hdrv_pcl_state.hwcdef_cnt; ii++)
+     if (stop_one_ctr (ii, ctr_list))
+       hwc_rc = HWCFUNCS_ERROR_GENERIC;
+-  TprintfT (DBG_LT1, "hwcdrv: hwcdrv_free_counters(tid=0x%lx).\n", pctx->tid);
++  TprintfT (DBG_LT1, "hwcdrv: hwcdrv_free_counters(tid=0x%lx).\n", (long) pctx->tid);
+   pctx->ctr_list = NULL;
+   return hwc_rc;
+ }
+@@ -1351,7 +1351,7 @@ hwcdrv_start (void) /* must be called from each thread ? */
+       return HWCFUNCS_ERROR_UNEXPECTED;
+     }
+   pctx->tid = hwcdrv_gettid ();
+-  TprintfT (DBG_LT1, "hwcdrv: hwcdrv_start(tid=0x%lx)\n", pctx->tid);
++  TprintfT (DBG_LT1, "hwcdrv: hwcdrv_start(tid=0x%lx)\n", (long) pctx->tid);
+ 
+   /*
+    * create per-thread counter list
+diff --git a/gprofng/configure b/gprofng/configure
+index fad5b030072..301ac10050b 100755
+--- a/gprofng/configure
++++ b/gprofng/configure
+@@ -16572,7 +16572,7 @@ class Simple{
+   }
+ }
+ EOF
+-      if { ac_try='$JAVAC conftest.java &5 2>&1'
++      if { ac_try='$JAVAC configtest.java &5 2>&1'
+   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -16608,6 +16608,34 @@ $as_echo "#define DEBUG 1" >>confdefs.h
+ 
+ fi
+ 
++cat > "dummy.c" << EOF
++#include <features.h>
++#if defined(__UCLIBC__)
++LIBC=uclibc
++#elif defined(__dietlibc__)
++LIBC=dietlibc
++#elif defined(__GLIBC__)
++LIBC=gnu
++#else
++#include <stdarg.h>
++/* First heuristic to detect musl libc.  */
++#ifdef __DEFINED_va_list
++LIBC=musl
++#else
++LIBC=gnu
++#endif
++#endif
++EOF
++cc_set_libc=`$CC -E "dummy.c" 2>/dev/null | grep '^LIBC=' | sed 's, ,,g'`
++eval "$cc_set_libc"
++echo "cc_set_libc=$cc_set_libc;"
++if test "$LIBC" = musl; then
++
++$as_echo "#define __MUSL_LIBC 1" >>confdefs.h
++
++fi
++
++
+ # Check if linker supports --as-needed and --no-as-needed options.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
+ $as_echo_n "checking linker --as-needed support... " >&6; }
+diff --git a/gprofng/configure.ac b/gprofng/configure.ac
+index e9453109602..2d7640dfdc8 100644
+--- a/gprofng/configure.ac
++++ b/gprofng/configure.ac
+@@ -142,7 +142,7 @@ class Simple{
+   }
+ }
+ EOF
+-      if AC_TRY_COMMAND($JAVAC conftest.java &AS_MESSAGE_LOG_FD 2>&1); then
++      if AC_TRY_COMMAND($JAVAC configtest.java &AS_MESSAGE_LOG_FD 2>&1); then
+ 	GPROFNG_BROKEN_JAVAC=no
+       else
+ 	GPROFNG_BROKEN_JAVAC=yes
+@@ -159,6 +159,31 @@ if test "${enable_gprofng_debug}" = yes; then
+     AC_DEFINE(DEBUG, 1, [Enable debugging output.])
+ fi
+ 
++cat > "dummy.c" << EOF
++#include <features.h>
++#if defined(__UCLIBC__)
++LIBC=uclibc
++#elif defined(__dietlibc__)
++LIBC=dietlibc
++#elif defined(__GLIBC__)
++LIBC=gnu
++#else
++#include <stdarg.h>
++/* First heuristic to detect musl libc.  */
++#ifdef __DEFINED_va_list
++LIBC=musl
++#else
++LIBC=gnu
++#endif
++#endif
++EOF
++cc_set_libc=`$CC -E "dummy.c" 2>/dev/null | grep '^LIBC=' | sed 's, ,,g'`
++eval "$cc_set_libc"
++if test "$LIBC" = musl; then
++  AC_DEFINE(__MUSL_LIBC, 1, [Build with musl-libc.])
++fi
++
++
+ # Check if linker supports --as-needed and --no-as-needed options.
+ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
+ 	[bfd_cv_ld_as_needed=no
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index ceff2c1cacc..93015305587 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -2155,7 +2155,7 @@ log_header_write (sp_origin_t origin)
+   ucontext_t ucp;
+   ucp.uc_stack.ss_sp = NULL;
+   ucp.uc_stack.ss_size = 0;
+-  if (getcontext (&ucp) == 0)
++  if (CALL_UTIL (getcontext) (&ucp) == 0)
+     {
+       (void) __collector_log_write ("<process stackbase=\"0x%lx\"></process>\n",
+ 				    (unsigned long) ucp.uc_stack.ss_sp + ucp.uc_stack.ss_size);
+@@ -2413,10 +2413,9 @@ __collector_dlog (int tflag, int level, char *format, ...)
+   int left = bufsz;
+   if ((tflag & SP_DUMP_NOHEADER) == 0)
+     {
+-      p += CALL_UTIL (snprintf)(p, left, "P%d,L%02u,t%02lu",
+-				(int) getpid (),
+-				(unsigned int) __collector_lwp_self (),
+-				__collector_no_threads ? 0 : __collector_thr_self ());
++      p += CALL_UTIL (snprintf) (p, left, "P%ld,L%02lu,t%02lu",
++	 (long) getpid (), (unsigned long) __collector_lwp_self (),
++	 (unsigned long) (__collector_no_threads ? 0 : __collector_thr_self ()));
+       left = bufsz - (p - buf);
+       if (tflag)
+ 	{
+diff --git a/gprofng/libcollector/collector.h b/gprofng/libcollector/collector.h
+index c54568d891c..b589d3f3d18 100644
+--- a/gprofng/libcollector/collector.h
++++ b/gprofng/libcollector/collector.h
+@@ -21,7 +21,6 @@
+ #ifndef _COLLECTOR_H
+ #define _COLLECTOR_H
+ 
+-#include <ucontext.h>
+ #include <signal.h>
+ 
+ #include "gp-defs.h"
+@@ -31,6 +30,11 @@
+ 
+ #define GETRELTIME()    (__collector_gethrtime() - __collector_start_time)
+ 
++#if defined(__MUSL_LIBC)
++#define dlvsym(f, nm, v)  dlsym (f, nm)
++#define SIGEV_THREAD_ID   4
++#endif
++
+ extern hrtime_t __collector_start_time;
+ 
+ /* ========================================================== */
+diff --git a/gprofng/libcollector/dispatcher.c b/gprofng/libcollector/dispatcher.c
+index f0308605d76..d3e4c52d667 100644
+--- a/gprofng/libcollector/dispatcher.c
++++ b/gprofng/libcollector/dispatcher.c
+@@ -30,9 +30,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ucontext.h>
+ #include <sys/param.h>
+-#include <sys/signal.h>
+ #include <sys/syscall.h>
+ #include <time.h>
+ #include <signal.h>
+@@ -575,7 +573,9 @@ collector_timer_create (timer_t * ptimerid)
+   sigev.sigev_notify = SIGEV_THREAD_ID | SIGEV_SIGNAL;
+   sigev.sigev_signo = SIGPROF;
+   sigev.sigev_value.sival_ptr = ptimerid;
++#if !defined(__MUSL_LIBC)
+   sigev._sigev_un._tid = __collector_gettid ();
++#endif
+   if (CALL_REAL (timer_create)(CLOCK_THREAD_CPUTIME_ID, &sigev, ptimerid) == -1)
+     {
+       TprintfT (DBG_LT2, "collector_timer_settime() failed! errno=%d\n", errno);
+diff --git a/gprofng/libcollector/hwprofile.c b/gprofng/libcollector/hwprofile.c
+index 6fdaf1bd8ff..e360068ea30 100644
+--- a/gprofng/libcollector/hwprofile.c
++++ b/gprofng/libcollector/hwprofile.c
+@@ -29,7 +29,6 @@
+ #include <errno.h>
+ #include <sys/syscall.h>
+ #include <signal.h>
+-#include <ucontext.h>
+ 
+ #include "gp-defs.h"
+ #define _STRING_H 1  /* XXX MEZ: temporary workaround */
+@@ -378,23 +377,23 @@ static void
+ init_ucontexts (void)
+ {
+   /* initialize dummy context for "collector" frames */
+-  getcontext (&expr_dummy_uc);
++  CALL_UTIL (getcontext) (&expr_dummy_uc);
+   SETFUNCTIONCONTEXT (&expr_dummy_uc, NULL);
+ 
+   /* initialize dummy context for "out-of-range" frames */
+-  getcontext (&expr_out_of_range_uc);
++  CALL_UTIL (getcontext) (&expr_out_of_range_uc);
+   SETFUNCTIONCONTEXT (&expr_out_of_range_uc, &__collector_hwcs_out_of_range);
+ 
+   /* initialize dummy context for "frozen" frames */
+-  getcontext (&expr_frozen_uc);
++  CALL_UTIL (getcontext) (&expr_frozen_uc);
+   SETFUNCTIONCONTEXT (&expr_frozen_uc, &__collector_hwcs_frozen);
+ 
+   /* initialize dummy context for non-program-related frames */
+-  getcontext (&expr_nopc_uc);
++  CALL_UTIL (getcontext) (&expr_nopc_uc);
+   SETFUNCTIONCONTEXT (&expr_nopc_uc, &__collector_not_program_related);
+ 
+   /* initialize dummy context for lost-counts-related frames */
+-  getcontext (&expr_lostcounts_uc);
++  CALL_UTIL (getcontext) (&expr_lostcounts_uc);
+   SETFUNCTIONCONTEXT (&expr_lostcounts_uc, &__collector_hwc_samples_lost);
+ }
+ /* initialize the signal handler */
+diff --git a/gprofng/libcollector/iolib.c b/gprofng/libcollector/iolib.c
+index 6881f02fd30..861843c183d 100644
+--- a/gprofng/libcollector/iolib.c
++++ b/gprofng/libcollector/iolib.c
+@@ -243,16 +243,14 @@ __collector_create_handle (char *descp)
+     {
+       /* allocate our buffers in virtual memory */
+       /* later, we will remap buffers individually to the file */
+-      uint8_t *memory = (uint8_t*) CALL_UTIL (mmap64)(0,
+-						      (size_t) (NBUFS * blksz),
+-						      PROT_READ | PROT_WRITE,
++      uint8_t *memory = (uint8_t*) CALL_UTIL (mmap64_) (0,
++	      (size_t) (NBUFS * blksz), PROT_READ | PROT_WRITE,
+ #if ARCH(SPARC)
+ 	      MAP_SHARED | MAP_ANON,
+ #else
+ 	      MAP_PRIVATE | MAP_ANON,
+ #endif
+-	      -1,
+-						      (off64_t) 0);
++	      -1, (off64_t) 0);
+       if (memory == MAP_FAILED)
+ 	{
+ 	  TprintfT (0, "create_handle: can't mmap MAP_ANON (for %s): %s\n", hndl->fname, CALL_UTIL (strerror)(errno));
+@@ -516,9 +514,8 @@ allocateChunk (DataHandle *hndl, unsigned ichunk)
+       if (__collector_cas_ptr (&hndl->chunks[ichunk], NULL, CHUNK_BUSY) == NULL)
+ 	{
+ 	  /* allocate virtual memory */
+-	  uint8_t *newchunk = (uint8_t*) CALL_UTIL (mmap64)(0,
+-							    (size_t) (blksz * hndl->nflow),
+-							    PROT_READ | PROT_WRITE,
++	  uint8_t *newchunk = (uint8_t*) CALL_UTIL (mmap64_) (0,
++		  (size_t) (blksz * hndl->nflow), PROT_READ | PROT_WRITE,
+ #if ARCH(SPARC)
+ 		  MAP_SHARED | MAP_ANON,
+ #else
+@@ -611,8 +608,10 @@ remapBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
+ 		  char errmsg[MAXPATHLEN + 50];
+ 		  hrtime_t teo = __collector_gethrtime ();
+ 		  double deltato = (double) (teo - tso) / 1000000.;
+-		  (void) CALL_UTIL (snprintf) (errmsg, sizeof (errmsg), " t=%d, %s: open-retries-failed = %d, %3.6f ms.; remap",
+-					       __collector_thr_self (), hndl->fname, iter, deltato);
++		  (void) CALL_UTIL (snprintf) (errmsg, sizeof (errmsg),
++			" t=%lu, %s: open-retries-failed=%d, %3.6f ms.; remap\n",
++			(unsigned long) __collector_thr_self (), hndl->fname,
++			iter, deltato);
+ 		  __collector_log_write ("<event kind=\"%s\" id=\"%d\">%s</event>\n",
+ 					 SP_JCMD_COMMENT, COL_COMMENT_NONE, errmsg);
+ 		  rc = 1;
+@@ -623,9 +622,9 @@ remapBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
+ 	    }
+ 	  deleteHandle (hndl);
+ 	  TprintfT (0, "remapBlock: can't open file: %s: %s\n", hndl->fname, STR (CALL_UTIL (strerror)(errno)));
+-	  __collector_log_write ("<event kind=\"%s\" id=\"%d\" ec=\"%d\">t=%llu, %s: remap </event>\n",
++	  __collector_log_write ("<event kind=\"%s\" id=\"%d\" ec=\"%d\">t=%lu, %s: remap </event>\n",
+ 				 SP_JCMD_CERROR, COL_ERROR_FILEOPN, errno,
+-				 (unsigned long long) __collector_thr_self (),
++				 (unsigned long) __collector_thr_self (),
+ 				 hndl->fname);
+ 	  rc = 1;
+ 	  goto exit;
+@@ -640,15 +639,18 @@ remapBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
+       char errmsg[MAXPATHLEN + 50];
+       hrtime_t teo = __collector_gethrtime ();
+       double deltato = (double) (teo - tso) / 1000000.;
+-      (void) CALL_UTIL (snprintf) (errmsg, sizeof (errmsg), " t=%d, %s: open-retries = %d, %3.6f ms.; remap",
+-				   __collector_thr_self (), hndl->fname, iter, deltato);
++      (void) CALL_UTIL (snprintf) (errmsg, sizeof (errmsg),
++	      " t=%d, %s: open-retries=%lu, %3.6f ms.; remap\n",
++	      (unsigned long) __collector_thr_self (), hndl->fname,
++	      iter, deltato);
+       __collector_log_write ("<event kind=\"%s\" id=\"%d\">%s</event>\n",
+ 			     SP_JCMD_COMMENT, COL_COMMENT_NONE, errmsg);
+     }
+ 
+   /* Ensure disk space is allocated and the block offset is 0 */
+   uint32_t zero = 0;
+-  int n = CALL_UTIL (pwrite64)(fd, &zero, sizeof (zero), (off64_t) (offset + blksz - sizeof (zero)));
++  int n = CALL_UTIL (pwrite64_) (fd, &zero, sizeof (zero),
++				(off64_t) (offset + blksz - sizeof (zero)));
+   if (n <= 0)
+     {
+       deleteHandle (hndl);
+@@ -663,13 +665,9 @@ remapBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
+ 
+   /* Map block to file */
+   uint8_t *bptr = getBlock (hndl, iflow, ichunk);
+-  uint8_t *vaddr = (uint8_t *) CALL_UTIL (mmap64)(
+-						  (void*) bptr,
+-						  (size_t) blksz,
+-						  PROT_READ | PROT_WRITE,
+-						  MAP_SHARED | MAP_FIXED,
+-						  fd,
+-						  offset);
++  uint8_t *vaddr = (uint8_t *) CALL_UTIL (mmap64_) ((void*) bptr,
++	  (size_t) blksz, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED,
++	  fd, offset);
+ 
+   if (vaddr != bptr)
+     {
+@@ -784,8 +782,9 @@ __collector_write_packet (DataHandle *hndl, CM_Packet *pckt)
+       TprintfT (0, "collector_write_packet: packet too long: %d (max %ld)\n", recsz, blksz);
+       return 1;
+     }
+-  unsigned tid = (__collector_no_threads ? __collector_lwp_self () : __collector_thr_self ());
+-  unsigned iflow = tid % hndl->nflow;
++  collector_thread_t tid = __collector_no_threads ? __collector_lwp_self ()
++						  : __collector_thr_self ();
++  unsigned iflow = (unsigned) (((unsigned long) tid) % hndl->nflow);
+ 
+   /* Acquire block */
+   uint32_t *sptr = &hndl->blkstate[iflow * NCHUNKS];
+@@ -925,7 +924,8 @@ mapBuffer (char *fname, Buffer *buf, off64_t foff)
+ 
+   /* ensure disk space is allocated */
+   char nl = '\n';
+-  int n = CALL_UTIL (pwrite64)(fd, &nl, sizeof (nl), (off64_t) (foff + blksz - sizeof (nl)));
++  int n = CALL_UTIL (pwrite64_) (fd, &nl, sizeof (nl),
++				 (off64_t) (foff + blksz - sizeof (nl)));
+   if (n <= 0)
+     {
+       TprintfT (0, "mapBuffer ERROR: can't pwrite file %s at 0x%llx\n", fname,
+@@ -937,7 +937,7 @@ mapBuffer (char *fname, Buffer *buf, off64_t foff)
+       goto exit;
+     }
+   /* mmap buf->vaddr to fname at foff */
+-  uint8_t *vaddr = CALL_UTIL (mmap64)(buf->vaddr, (size_t) blksz,
++  uint8_t *vaddr = CALL_UTIL (mmap64_) (buf->vaddr, (size_t) blksz,
+ 	  PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd, foff);
+   if (vaddr != buf->vaddr)
+     {
+diff --git a/gprofng/libcollector/iotrace.c b/gprofng/libcollector/iotrace.c
+index 9b47724bab9..d94daefa89b 100644
+--- a/gprofng/libcollector/iotrace.c
++++ b/gprofng/libcollector/iotrace.c
+@@ -34,7 +34,7 @@
+ #include <fcntl.h>
+ 
+ #include "gp-defs.h"
+-#include "collector_module.h"
++#include "collector.h"
+ #include "gp-experiment.h"
+ #include "data_pckts.h"
+ #include "tsd.h"
+@@ -999,6 +999,22 @@ init_io_intf ()
+   return rc;
+ }
+ 
++static void
++write_io_packet (int fd, ssize_t ret, hrtime_t reqt, int iotype)
++{
++  IOTrace_packet iopkt;
++  collector_memset (&iopkt, 0, sizeof ( IOTrace_packet));
++  iopkt.comm.tsize = sizeof (IOTrace_packet);
++  iopkt.comm.tstamp = gethrtime ();
++  iopkt.requested = reqt;
++  iopkt.iotype = iotype;
++  iopkt.fd = fd;
++  iopkt.nbyte = ret;
++  iopkt.comm.frinfo = collector_interface->getFrameInfo (io_hndl,
++			iopkt.comm.tstamp, FRINFO_FROM_STACK, &iopkt);
++  collector_interface->writeDataRecord (io_hndl, (Common_packet*) & iopkt);
++}
++
+ /*------------------------------------------------------------- open */
+ int
+ open (const char *path, int oflag, ...)
+@@ -2412,162 +2428,147 @@ pread (int fildes, void *buf, size_t nbyte, off_t offset)
+ }
+ 
+ /*------------------------------------------------------------- pwrite */
+-#if ARCH(Intel) && WSIZE(32)
++
++#if !defined(__MUSL_LIBC) && ARCH(Intel) && WSIZE(32)
+ // map interposed symbol versions
+-static int
+-__collector_pwrite_symver (int(real_pwrite) (), int fildes, const void *buf, size_t nbyte, off_t offset);
+ 
+ SYMVER_ATTRIBUTE (__collector_pwrite_2_2, pwrite@@GLIBC_2.2)
+ int
+ __collector_pwrite_2_2 (int fildes, const void *buf, size_t nbyte, off_t offset)
+ {
+-  TprintfT (DBG_LTT, "iotrace: __collector_pwrite_2_2@%p(fildes=%d, buf=%p, nbyte=%lld, offset=%lld)\n",
+-	    CALL_REAL (pwrite_2_2), fildes, buf, (long long) nbyte, (long long) offset);
+-  if (NULL_PTR (pwrite))
++  int *guard;
++  if (NULL_PTR (pwrite_2_2))
+     init_io_intf ();
+-  return __collector_pwrite_symver (CALL_REAL (pwrite_2_2), fildes, buf, nbyte, offset);
++  if (CHCK_REENTRANCE (guard))
++    return CALL_REAL (pwrite_2_2)(fildes, buf, nbyte, offset);
++  PUSH_REENTRANCE (guard);
++  hrtime_t reqt = gethrtime ();
++  ssize_t ret = CALL_REAL (pwrite_2_2)(fildes, buf, nbyte, offset);
++  if (RECHCK_REENTRANCE (guard))
++    {
++      POP_REENTRANCE (guard);
++      return ret;
++    }
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
++  POP_REENTRANCE (guard);
++  return ret;
+ }
+ 
+ SYMVER_ATTRIBUTE (__collector_pwrite_2_1, pwrite@GLIBC_2.1)
+ int
+ __collector_pwrite_2_1 (int fildes, const void *buf, size_t nbyte, off_t offset)
+ {
+-  TprintfT (DBG_LTT, "iotrace: __collector_pwrite_2_1@%p(fildes=%d, buf=%p, nbyte=%lld, offset=%lld)\n",
+-	    CALL_REAL (pwrite_2_1), fildes, buf, (long long) nbyte, (long long) offset);
+-  if (NULL_PTR (pwrite))
++  int *guard;
++  if (NULL_PTR (pwrite_2_1))
+     init_io_intf ();
+-  return __collector_pwrite_symver (CALL_REAL (pwrite_2_1), fildes, buf, nbyte, offset);
++  if (CHCK_REENTRANCE (guard))
++    return CALL_REAL (pwrite_2_1)(fildes, buf, nbyte, offset);
++  PUSH_REENTRANCE (guard);
++  hrtime_t reqt = gethrtime ();
++  ssize_t ret = CALL_REAL (pwrite_2_1)(fildes, buf, nbyte, offset);
++  if (RECHCK_REENTRANCE (guard))
++    {
++      POP_REENTRANCE (guard);
++      return ret;
++    }
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
++  POP_REENTRANCE (guard);
++  return ret;
+ }
+-
+-static int
+-__collector_pwrite_symver (int(real_pwrite) (), int fildes, const void *buf, size_t nbyte, off_t offset)
+-{
+-#else /* ^ARCH(Intel) && WSIZE(32) */
++#endif /* !defined(__MUSL_LIBC) && ARCH(Intel) && WSIZE(32) */
+ 
+ ssize_t
+ pwrite (int fildes, const void *buf, size_t nbyte, off_t offset)
+ {
+-#endif /* ^ARCH(Intel) && WSIZE(32) */
+   int *guard;
+-  ssize_t ret;
+-  IOTrace_packet iopkt;
+   if (NULL_PTR (pwrite))
+     init_io_intf ();
+   if (CHCK_REENTRANCE (guard))
+-    {
+-#if ARCH(Intel) && WSIZE(32)
+-      return (real_pwrite) (fildes, buf, nbyte, offset);
+-#else
+-      return CALL_REAL (pwrite)(fildes, buf, nbyte, offset);
+-#endif
+-    }
++    return CALL_REAL (pwrite)(fildes, buf, nbyte, offset);
+   PUSH_REENTRANCE (guard);
+   hrtime_t reqt = gethrtime ();
+-#if ARCH(Intel) && WSIZE(32)
+-  ret = (real_pwrite) (fildes, buf, nbyte, offset);
+-#else
+-  ret = CALL_REAL (pwrite)(fildes, buf, nbyte, offset);
+-#endif
++  ssize_t ret = CALL_REAL (pwrite)(fildes, buf, nbyte, offset);
+   if (RECHCK_REENTRANCE (guard))
+     {
+       POP_REENTRANCE (guard);
+       return ret;
+     }
+-  hrtime_t grnt = gethrtime ();
+-  collector_memset (&iopkt, 0, sizeof ( IOTrace_packet));
+-  iopkt.comm.tsize = sizeof ( IOTrace_packet);
+-  iopkt.comm.tstamp = grnt;
+-  iopkt.requested = reqt;
+-  if (ret >= 0)
+-    iopkt.iotype = WRITE_TRACE;
+-  else
+-    iopkt.iotype = WRITE_TRACE_ERROR;
+-  iopkt.fd = fildes;
+-  iopkt.nbyte = ret;
+-  iopkt.comm.frinfo = collector_interface->getFrameInfo (io_hndl, iopkt.comm.tstamp, FRINFO_FROM_STACK, &iopkt);
+-  collector_interface->writeDataRecord (io_hndl, (Common_packet*) & iopkt);
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
+   POP_REENTRANCE (guard);
+   return ret;
+ }
+ 
+ /*------------------------------------------------------------- pwrite64 */
++#if !defined(__MUSL_LIBC)
+ #if ARCH(Intel) && WSIZE(32)
+ // map interposed symbol versions
+-static int
+-__collector_pwrite64_symver (int(real_pwrite64) (), int fildes, const void *buf, size_t nbyte, off64_t offset);
+ 
+ SYMVER_ATTRIBUTE (__collector_pwrite64_2_2, pwrite64@@GLIBC_2.2)
+-int
++ssize_t
+ __collector_pwrite64_2_2 (int fildes, const void *buf, size_t nbyte, off64_t offset)
+ {
+-  TprintfT (DBG_LTT, "iotrace: __collector_pwrite64_2_2@%p(fildes=%d, buf=%p, nbyte=%lld, offset=%lld)\n",
+-	    CALL_REAL (pwrite64_2_2), fildes, buf, (long long) nbyte, (long long) offset);
+-  if (NULL_PTR (pwrite64))
++  int *guard;
++  if (NULL_PTR (pwrite64_2_2))
+     init_io_intf ();
+-  return __collector_pwrite64_symver (CALL_REAL (pwrite64_2_2), fildes, buf, nbyte, offset);
++  if (CHCK_REENTRANCE (guard))
++    return CALL_REAL (pwrite64_2_2)(fildes, buf, nbyte, offset);
++  PUSH_REENTRANCE (guard);
++  hrtime_t reqt = gethrtime ();
++  ssize_t ret = CALL_REAL (pwrite64_2_2)(fildes, buf, nbyte, offset);
++  if (RECHCK_REENTRANCE (guard))
++    {
++      POP_REENTRANCE (guard);
++      return ret;
++    }
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
++  POP_REENTRANCE (guard);
++  return ret;
+ }
+ 
+ SYMVER_ATTRIBUTE (__collector_pwrite64_2_1, pwrite64@GLIBC_2.1)
+ int
+ __collector_pwrite64_2_1 (int fildes, const void *buf, size_t nbyte, off64_t offset)
+ {
+-  TprintfT (DBG_LTT, "iotrace: __collector_pwrite64_2_1@%p(fildes=%d, buf=%p, nbyte=%lld, offset=%lld)\n",
+-	    CALL_REAL (pwrite64_2_1), fildes, buf, (long long) nbyte, (long long) offset);
+-  if (NULL_PTR (pwrite64))
++  int *guard;
++  if (NULL_PTR (pwrite64_2_1))
+     init_io_intf ();
+-  return __collector_pwrite64_symver (CALL_REAL (pwrite64_2_1), fildes, buf, nbyte, offset);
++  if (CHCK_REENTRANCE (guard))
++    return CALL_REAL (pwrite64_2_1)(fildes, buf, nbyte, offset);
++  PUSH_REENTRANCE (guard);
++  hrtime_t reqt = gethrtime ();
++  ssize_t ret = CALL_REAL (pwrite64_2_1)(fildes, buf, nbyte, offset);
++  if (RECHCK_REENTRANCE (guard))
++    {
++      POP_REENTRANCE (guard);
++      return ret;
++    }
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
++  POP_REENTRANCE (guard);
++  return ret;
+ }
+-
+-static int
+-__collector_pwrite64_symver (int(real_pwrite64) (), int fildes, const void *buf, size_t nbyte, off64_t offset)
+-{
+-#else /* ^ARCH(Intel) && WSIZE(32) */
++#endif
+ 
+ ssize_t
+ pwrite64 (int fildes, const void *buf, size_t nbyte, off64_t offset)
+ {
+-#endif /* ^ARCH(Intel) && WSIZE(32) */
+   int *guard;
+-  ssize_t ret;
+-  IOTrace_packet iopkt;
+   if (NULL_PTR (pwrite64))
+     init_io_intf ();
+   if (CHCK_REENTRANCE (guard))
+-    {
+-#if ARCH(Intel) && WSIZE(32)
+-      return (real_pwrite64) (fildes, buf, nbyte, offset);
+-#else
+-      return CALL_REAL (pwrite64)(fildes, buf, nbyte, offset);
+-#endif
+-    }
++    return CALL_REAL (pwrite64)(fildes, buf, nbyte, offset);
+   PUSH_REENTRANCE (guard);
+   hrtime_t reqt = gethrtime ();
+-#if ARCH(Intel) && WSIZE(32)
+-  ret = (real_pwrite64) (fildes, buf, nbyte, offset);
+-#else
+-  ret = CALL_REAL (pwrite64)(fildes, buf, nbyte, offset);
+-#endif
++  ssize_t ret = CALL_REAL (pwrite64)(fildes, buf, nbyte, offset);
+   if (RECHCK_REENTRANCE (guard))
+     {
+       POP_REENTRANCE (guard);
+       return ret;
+     }
+-  hrtime_t grnt = gethrtime ();
+-  collector_memset (&iopkt, 0, sizeof ( IOTrace_packet));
+-  iopkt.comm.tsize = sizeof ( IOTrace_packet);
+-  iopkt.comm.tstamp = grnt;
+-  iopkt.requested = reqt;
+-  if (ret >= 0)
+-    iopkt.iotype = WRITE_TRACE;
+-  else
+-    iopkt.iotype = WRITE_TRACE_ERROR;
+-  iopkt.fd = fildes;
+-  iopkt.nbyte = ret;
+-  iopkt.comm.frinfo = collector_interface->getFrameInfo (io_hndl, iopkt.comm.tstamp, FRINFO_FROM_STACK, &iopkt);
+-  collector_interface->writeDataRecord (io_hndl, (Common_packet*) & iopkt);
++  write_io_packet (fildes, ret, reqt, ret >= 0 ? WRITE_TRACE : WRITE_TRACE_ERROR);
+   POP_REENTRANCE (guard);
+   return ret;
+ }
++#endif
+ 
+ /*------------------------------------------------------------- fgets */
+ char*
+diff --git a/gprofng/libcollector/jprofile.c b/gprofng/libcollector/jprofile.c
+index 9daaa5a267e..52114066726 100644
+--- a/gprofng/libcollector/jprofile.c
++++ b/gprofng/libcollector/jprofile.c
+@@ -285,12 +285,6 @@ __collector_jprofile_start_attach (void)
+ 	    {
+ 	      jthread thread;
+ 	      (*jvmti)->GetCurrentThread (jvmti, &thread);
+-#ifdef DEBUG
+-	      collector_thread_t tid;
+-	      tid = __collector_thr_self ();
+-	      TprintfT (0, "jprofile attach: AttachCurrentThread: thread: %lu jni_env=%p jthread=%p\n",
+-			(unsigned long) tid, jni_env, thread);
+-#endif /* DEBUG */
+ 	      jvmti_VMInit (jvmti, jni_env, thread);
+ 	      (*jvmti)->GenerateEvents (jvmti, JVMTI_EVENT_COMPILED_METHOD_LOAD);
+ 	      (*jvmti)->GenerateEvents (jvmti, JVMTI_EVENT_DYNAMIC_CODE_GENERATED);
+diff --git a/gprofng/libcollector/libcol_util.c b/gprofng/libcollector/libcol_util.c
+index c709b3c5ed1..d682aa0ab29 100644
+--- a/gprofng/libcollector/libcol_util.c
++++ b/gprofng/libcollector/libcol_util.c
+@@ -1116,9 +1116,9 @@ __collector_util_init ()
+   /*    internal calls for mapping in libcollector call mmap64 */
+   ptr = dlsym (libc, "mmap64");
+   if (ptr)
+-    __collector_util_funcs.mmap64 = (void*(*)(void *, size_t, int, int, int, off_t))ptr;
++    __collector_util_funcs.mmap64_ = (void*(*)(void *, size_t, int, int, int, off_t))ptr;
+   else
+-    __collector_util_funcs.mmap64 = __collector_util_funcs.mmap;
++    __collector_util_funcs.mmap64_ = __collector_util_funcs.mmap;
+ 
+   ptr = dlsym (libc, "munmap");
+   if (ptr)
+@@ -1214,16 +1214,16 @@ __collector_util_init ()
+ #if ARCH(Intel) && WSIZE(32)
+   ptr = dlvsym (libc, "pwrite64", "GLIBC_2.2"); // it is in /lib/libpthread.so.0
+   if (ptr)
+-    __collector_util_funcs.pwrite64 = (ssize_t (*)())ptr;
++    __collector_util_funcs.pwrite64_ = (ssize_t (*)())ptr;
+   else
+     {
+       Tprintf (DBG_LT0, "libcol_util: WARNING: dlvsym for %s@%s failed. Using dlsym() instead.", "pwrite64", "GLIBC_2.2");
+ #endif /* ARCH(Intel) && WSIZE(32) */
+       ptr = dlsym (libc, "pwrite64");
+       if (ptr)
+-	__collector_util_funcs.pwrite64 = (ssize_t (*)())ptr;
++	__collector_util_funcs.pwrite64_ = (ssize_t (*)())ptr;
+       else
+-	__collector_util_funcs.pwrite64 = __collector_util_funcs.pwrite;
++	__collector_util_funcs.pwrite64_ = __collector_util_funcs.pwrite;
+ #if ARCH(Intel) && WSIZE(32)
+     }
+ #endif /* ARCH(Intel) && WSIZE(32) */
+@@ -1319,6 +1319,15 @@ __collector_util_init ()
+   __collector_util_funcs.getcpuid = __collector_getcpuid;
+   __collector_util_funcs.memset = collector_memset;
+ 
++  ptr = dlsym (libc, "getcontext");
++  if (ptr)
++    __collector_util_funcs.getcontext = (int(*)())ptr;
++  else
++    {
++      CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT getcontext: %s\n", dlerror ());
++      err = COL_ERROR_UTIL_INIT;
++    }
++
+   ptr = dlsym (libc, "malloc");
+   if (ptr)
+     __collector_util_funcs.malloc = (void *(*)(size_t))ptr;
+diff --git a/gprofng/libcollector/libcol_util.h b/gprofng/libcollector/libcol_util.h
+index e13a02ea6d7..c32c76f091b 100644
+--- a/gprofng/libcollector/libcol_util.h
++++ b/gprofng/libcollector/libcol_util.h
+@@ -59,12 +59,11 @@ extern int __collector_xml_snprintf (char *s, size_t n, const char *format, ...)
+ extern int __collector_xml_vsnprintf (char *s, size_t n, const char *format, va_list args);
+ 
+ /* -------  collector_thread ----------------- */
+-pid_t __collector_gettid ();
++extern pid_t __collector_gettid ();
+ extern void __collector_ext_gettid_tsd_create_key ();
+-#define collector_thread_t pthread_t            // not using pid_t, since tid is defined as pthread_t in package structures, and other codes assume this type
+-#define statvfs_t  struct statvfs
+-#define __collector_lwp_self() (collector_thread_t)__collector_gettid() // not using pthread_self()
+-#define __collector_thr_self() (collector_thread_t)__collector_gettid() // not using pthread_self()
++typedef pthread_t collector_thread_t;
++#define __collector_lwp_self() ((collector_thread_t) ((unsigned long) __collector_gettid()))
++#define __collector_thr_self() ((collector_thread_t) ((unsigned long) __collector_gettid()))
+ 
+ /* -------  collector_mutex ----------------- */
+ /*
+diff --git a/gprofng/libcollector/linetrace.c b/gprofng/libcollector/linetrace.c
+index 978c5503e2e..a209308c767 100644
+--- a/gprofng/libcollector/linetrace.c
++++ b/gprofng/libcollector/linetrace.c
+@@ -29,6 +29,8 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
++#include <limits.h>
++
+ 
+ #include "descendants.h"
+ 
+@@ -360,7 +362,7 @@ check_fd_dynamic (int fd)
+   size_t sz = (size_t) 8192; /* one page should suffice */
+   if (sz > off)
+     sz = off;
+-  char *p = CALL_UTIL (mmap64)((char *) 0, sz, PROT_READ, MAP_PRIVATE, fd, (off64_t) 0);
++  char *p = CALL_UTIL (mmap64_)((char *) 0, sz, PROT_READ, MAP_PRIVATE, fd, (off64_t) 0);
+   if (p == MAP_FAILED)
+     {
+       TprintfT (DBG_LT0, "check_fd_dynamic(): ERROR/WARNING: mmap failed for `%d'\n", fd);
+diff --git a/gprofng/libcollector/memmgr.c b/gprofng/libcollector/memmgr.c
+index 5ada421f3f4..aa13ea77852 100644
+--- a/gprofng/libcollector/memmgr.c
++++ b/gprofng/libcollector/memmgr.c
+@@ -131,7 +131,7 @@ alloc_chunk (unsigned sz, int log)
+   if (log == 1)
+     Tprintf (DBG_LT2, "alloc_chunk mapping %u, rounded up from %u\n", (unsigned int) chunksz, sz);
+   /* mmap64 is only in 32-bits; this call goes to mmap in 64-bits */
+-  ptr = (char*) CALL_UTIL (mmap64)(0, chunksz, PROT_READ | PROT_WRITE,
++  ptr = (char*) CALL_UTIL (mmap64_)(0, chunksz, PROT_READ | PROT_WRITE,
+ 				   MAP_PRIVATE | MAP_ANON, (int) -1, (off64_t) 0);
+   if (ptr == MAP_FAILED)
+     {
+diff --git a/gprofng/libcollector/mmaptrace.c b/gprofng/libcollector/mmaptrace.c
+index ba5c9129f4c..bd299e6f64f 100644
+--- a/gprofng/libcollector/mmaptrace.c
++++ b/gprofng/libcollector/mmaptrace.c
+@@ -441,13 +441,9 @@ checksum_mapname (MapInfo* map)
+ }
+ 
+ 
+-#if (ARCH(Intel) && WSIZE(32)) || ARCH(SPARC)
+-static void*
+-dlopen_searchpath_symver (void*(real_dlopen) (), void* caller_addr, const char* basename, int mode)
+-#else
+ static void*
+-dlopen_searchpath (void* caller_addr, const char* basename, int mode)
+-#endif
++dlopen_searchpath (void*(real_dlopen) (const char *, int),
++		void *caller_addr, const char *basename, int mode)
+ {
+   TprintfT (DBG_LT2, "dlopen_searchpath(%p, %s, %d)\n", caller_addr, basename, mode);
+   Dl_info dl_info;
+@@ -458,7 +454,8 @@ dlopen_searchpath (void* caller_addr, const char* basename, int mode)
+     }
+   TprintfT (DBG_LT2, "dladdr(%p): %p fname=%s\n",
+ 	    caller_addr, dl_info.dli_fbase, dl_info.dli_fname);
+-  int noload = RTLD_BINDING_MASK | RTLD_NOLOAD; //XXXX why RTLD_BINDING_MASK?
++  int noload = RTLD_LAZY | RTLD_NOW | RTLD_NOLOAD;
++  void *caller_hndl = NULL;
+ #define WORKAROUND_RTLD_BUG 1
+ #ifdef WORKAROUND_RTLD_BUG
+   // A dynamic linker dlopen bug can result in corruption/closure of open streams
+@@ -470,29 +467,20 @@ dlopen_searchpath (void* caller_addr, const char* basename, int mode)
+ #endif
+   const char* tmp_path =
+ 	  (dl_info.dli_fbase == (void*) MAINBASE) ? NULL : dl_info.dli_fname;
+-  void* caller_hndl = NULL;
+-#if ((ARCH(Intel) && WSIZE(32)) || ARCH(SPARC))
+-  caller_hndl = (real_dlopen) (tmp_path, noload);
+-#else
+-  caller_hndl = CALL_REAL (dlopen)(tmp_path, noload);
+-#endif
++  caller_hndl = real_dlopen (tmp_path, noload);
+ 
+ #else //XXXX workaround should be removed once linker patches are all available
+ 
+-  void* caller_hndl = NULL;
+-#if (ARCH(Intel) && WSIZE(32) || ARCH(SPARC)
+-  caller_hndl = (real_dlopen) (dl_info.dli_fname, noload);
+-#else
+-  caller_hndl = CALL_REAL (dlopen)(dl_info.dli_fname, noload);
+-#endif
++  caller_hndl = real_dlopen (dl_info.dli_fname, noload);
+ 
+ #endif //XXXX workaround should be removed once linker patches are all available
+ 
+   if (!caller_hndl)
+     {
+       TprintfT (0, "ERROR: dlopen(%s,NOLOAD): %s\n", dl_info.dli_fname, dlerror ());
+-      return 0;
++      return NULL;
+     }
++#if !defined(__MUSL_LIBC)
+   Dl_serinfo _info, *info = &_info;
+   Dl_serpath *path;
+ 
+@@ -546,7 +534,7 @@ dlopen_searchpath (void* caller_addr, const char* basename, int mode)
+       I have already confirmed with our user that the workaround
+       is working with his real application. Additionally,
+       the dlopen_searchpath() function is called only by the
+-      libcorrector init() function when the experiment is started.
++      libcollector init() function when the experiment is started.
+       Therefore, allocating some extra bytes on the stack which
+       is local to this routine is harmless.
+    */
+@@ -575,7 +563,8 @@ dlopen_searchpath (void* caller_addr, const char* basename, int mode)
+       if (ret)
+ 	return ret; // success!
+     }
+-  return 0;
++#endif
++  return NULL;
+ }
+ 
+ static void
+@@ -1550,40 +1539,9 @@ munmap (void *start, size_t length)
+ 
+ 
+ /*------------------------------------------------------------- dlopen */
+-// map interposed symbol versions
+-#if (ARCH(Intel) && WSIZE(32)) || ARCH(SPARC)
+-
+-static void *
+-__collector_dlopen_symver (void*(real_dlopen) (), void *caller, const char *pathname, int mode);
+-
+-SYMVER_ATTRIBUTE (__collector_dlopen_2_1, dlopen@@GLIBC_2.1)
+-void *
+-__collector_dlopen_2_1 (const char *pathname, int mode)
+-{
+-  if (NULL_PTR (dlopen))
+-    init_mmap_intf ();
+-  void *caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
+-  return __collector_dlopen_symver (CALL_REAL (dlopen_2_1), caller, pathname, mode);
+-}
+-
+-SYMVER_ATTRIBUTE (__collector_dlopen_2_0, dlopen@GLIBC_2.0)
+-void *
+-__collector_dlopen_2_0 (const char *pathname, int mode)
+-{
+-  if (NULL_PTR (dlopen))
+-    init_mmap_intf ();
+-  void* caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
+-  return __collector_dlopen_symver (CALL_REAL (dlopen_2_0), caller, pathname, mode);
+-}
+-#endif
+-
+-#if (ARCH(Intel) && WSIZE(32)) || ARCH(SPARC)
+ static void *
+-__collector_dlopen_symver (void*(real_dlopen) (), void *caller, const char *pathname, int mode)
+-#else
+-void *
+-dlopen (const char *pathname, int mode)
+-#endif
++__collector_dlopen_symver (void*(real_dlopen) (const char *, int),
++			   void *caller, const char *pathname, int mode)
+ {
+   const char * real_pathname = pathname;
+   char new_pathname[MAXPATHLEN];
+@@ -1595,10 +1553,6 @@ dlopen (const char *pathname, int mode)
+     origin_offset = 10;
+   if (origin_offset)
+     {
+-#if ! ((ARCH(Intel) && WSIZE(32)) || ARCH(SPARC))
+-      // 'caller' is not passed as an argument
+-      void * caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
+-#endif
+       Dl_info dl_info;
+       if (caller && dladdr (caller, &dl_info) != 0)
+ 	{
+@@ -1619,37 +1573,18 @@ dlopen (const char *pathname, int mode)
+     init_mmap_intf ();
+   TprintfT (DBG_LT2, "libcollector.dlopen(%s,%d) interposing\n",
+ 	    pathname ? pathname : "", mode);
+-  void* ret = NULL;
++  void *ret = NULL;
+ 
+   // set guard for duration of handling dlopen, since want to ensure
+   // new mappings are resolved after the actual dlopen has occurred
+   PUSH_REENTRANCE;
+   hrtime_t hrt = GETRELTIME ();
+ 
+-  if (real_pathname && !__collector_strchr (real_pathname, '/'))
+-    { // got an unqualified name
+-      // get caller and use its searchpath
+-#if ! ((ARCH(Intel) && WSIZE(32)) || ARCH(SPARC))
+-      void* caller = __builtin_return_address (0); // must be called inside dlopen
+-#endif
+-      if (caller)
+-	{
+-#if (ARCH(Intel) && WSIZE(32)) || ARCH(SPARC)
+-	  ret = dlopen_searchpath_symver (real_dlopen, caller, real_pathname, mode);
+-#else
+-	  ret = dlopen_searchpath (caller, real_pathname, mode);
+-#endif
+-	}
+-    }
++  if (caller && real_pathname && !__collector_strchr (real_pathname, '/'))
++    ret = dlopen_searchpath (real_dlopen, caller, real_pathname, mode);
+ 
+   if (!ret)
+-    {
+-#if (ARCH(Intel) && WSIZE(32)) || ARCH(SPARC)
+-      ret = (real_dlopen) (real_pathname, mode);
+-#else
+-      ret = CALL_REAL (dlopen)(real_pathname, mode);
+-#endif
+-    }
++    ret = real_dlopen (real_pathname, mode);
+   TprintfT (DBG_LT2, "libcollector -- dlopen(%s) returning %p\n", pathname, ret);
+ 
+   /* Don't call update if dlopen failed: preserve dlerror() */
+@@ -1660,6 +1595,39 @@ dlopen (const char *pathname, int mode)
+   return ret;
+ }
+ 
++void *
++dlopen (const char *pathname, int mode)
++{
++  if (NULL_PTR (dlopen))
++    init_mmap_intf ();
++  void* caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
++  return __collector_dlopen_symver (CALL_REAL (dlopen), caller, pathname, mode);
++}
++
++#if !defined(__MUSL_LIBC) && ((ARCH(Intel) && WSIZE(32)) || ARCH(SPARC))
++// map interposed symbol versions
++
++SYMVER_ATTRIBUTE (__collector_dlopen_2_1, dlopen@@GLIBC_2.1)
++void *
++__collector_dlopen_2_1 (const char *pathname, int mode)
++{
++  if (NULL_PTR (dlopen_2_1))
++    init_mmap_intf ();
++  void *caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
++  return __collector_dlopen_symver (CALL_REAL (dlopen_2_1), caller, pathname, mode);
++}
++
++SYMVER_ATTRIBUTE (__collector_dlopen_2_0, dlopen@GLIBC_2.0)
++void *
++__collector_dlopen_2_0 (const char *pathname, int mode)
++{
++  if (NULL_PTR (dlopen_2_0))
++    init_mmap_intf ();
++  void* caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
++  return __collector_dlopen_symver (CALL_REAL (dlopen_2_0), caller, pathname, mode);
++}
++#endif
++
+ /*------------------------------------------------------------- dlclose */
+ int
+ dlclose (void *handle)
+diff --git a/gprofng/libcollector/profile.c b/gprofng/libcollector/profile.c
+index 996d3f09198..ee9fb7d3b0c 100644
+--- a/gprofng/libcollector/profile.c
++++ b/gprofng/libcollector/profile.c
+@@ -268,7 +268,7 @@ __collector_ext_profile_handler (siginfo_t *info, ucontext_t *context)
+       /* assume this case is rare, and accept overhead of creating dummy_uc */
+       TprintfT (0, "collector_profile_handler: ERROR: got NULL context!\n");
+       context = &uctxmem;
+-      getcontext (context);     /* initialize dummy context */
++      CALL_UTIL (getcontext) (context);     /* initialize dummy context */
+       SETFUNCTIONCONTEXT (context, &__collector_lost_profile_context);
+     }
+   ClockPacket pckt;
+diff --git a/gprofng/libcollector/synctrace.c b/gprofng/libcollector/synctrace.c
+index 492ef9993f7..d48aeaa2d2d 100644
+--- a/gprofng/libcollector/synctrace.c
++++ b/gprofng/libcollector/synctrace.c
+@@ -32,10 +32,9 @@
+ #include <pthread.h>
+ 
+ #include "gp-defs.h"
+-#include "collector_module.h"
++#include "collector.h"
+ #include "gp-experiment.h"
+ #include "data_pckts.h"
+-#include "i18n.h"
+ #include "tsd.h"
+ #include "cc_libcollector.h"
+ 
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index f8e11823c81..009b5ab8456 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -232,7 +232,7 @@ memory_error_func (int status ATTRIBUTE_UNUSED, bfd_vma addr ATTRIBUTE_UNUSED,
+ 
+ #elif ARCH(Aarch64)
+ #define FILL_CONTEXT(context) \
+-    { getcontext(context);  \
++    { CALL_UTIL (getcontext) (context);  \
+       context->uc_mcontext.sp = (__u64) __builtin_frame_address(0); \
+     }
+ 
+diff --git a/gprofng/src/Experiment.cc b/gprofng/src/Experiment.cc
+index c797724af07..98aae9714ac 100644
+--- a/gprofng/src/Experiment.cc
++++ b/gprofng/src/Experiment.cc
+@@ -6466,7 +6466,7 @@ int
+ Experiment::copy_file_to_archive (const char *name, const char *aname, int hide_msg)
+ {
+   errno = 0;
+-  int fd_w = open64 (aname, O_WRONLY | O_CREAT | O_EXCL, 0644);
++  int fd_w = ::open64 (aname, O_WRONLY | O_CREAT | O_EXCL, 0644);
+   if (fd_w == -1)
+     {
+       if (errno == EEXIST)
+@@ -6484,7 +6484,7 @@ Experiment::copy_file_to_archive (const char *name, const char *aname, int hide_
+       return 1;
+     }
+ 
+-  int fd_r = open64 (name, O_RDONLY);
++  int fd_r = ::open64 (name, O_RDONLY);
+   if (fd_r == -1)
+     {
+       fprintf (stderr, GTXT ("er_archive: unable to open `%s': %s\n"),
+diff --git a/gprofng/src/Print.cc b/gprofng/src/Print.cc
+index d415d591e1e..03932530956 100644
+--- a/gprofng/src/Print.cc
++++ b/gprofng/src/Print.cc
+@@ -2209,14 +2209,14 @@ print_anno_file (char *name, const char *sel, const char *srcFile,
+ 	    {
+ 	      fitem = func->getDefSrc ();
+ 	      found = (func->line_first > 0)
+-		      && strcmp (basename (srcFile),
+-				 basename (fitem->get_name ())) == 0;
++		      && strcmp (get_basename (srcFile),
++				 get_basename (fitem->get_name ())) == 0;
+ 	    }
+ 	  else
+ 	    {
+ 	      Vec_loop (SourceFile*, sources, index, fitem)
+ 	      {
+-		if (strcmp (basename (srcFile), basename (fitem->get_name ())) == 0)
++		if (strcmp (get_basename (srcFile), get_basename (fitem->get_name ())) == 0)
+ 		  {
+ 		    found = true;
+ 		    break;
+diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
+index f608dab5831..6cf53d5b27f 100644
+--- a/gprofng/src/collector_module.h
++++ b/gprofng/src/collector_module.h
+@@ -25,6 +25,7 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <unistd.h>
++#include <ucontext.h>
+ #include <dirent.h>
+ 
+ #include "gp-defs.h"
+@@ -55,6 +56,7 @@ typedef struct CollectorUtilFuncs
+   int (*fprintf)(FILE *stream, const char *format, ...);
+   void (*free)(void *ptr);
+   int (*fstat)(int fd, struct stat *buf);
++  int (*getcontext)(ucontext_t *ucp);
+   int (*getcpuid)();
+   char *(*getcwd)(char *buf, size_t size);
+   char *(*getenv)(const char *name);
+@@ -66,7 +68,7 @@ typedef struct CollectorUtilFuncs
+   int (*mkdir)();
+   time_t (*mktime)(struct tm *timeptr);
+   void *(*mmap)(void *, size_t, int, int, int, off_t);
+-  void *(*mmap64)();
++  void *(*mmap64_)();
+   int (*munmap)();
+   int (*open)(const char *, int, ...);
+   int (*open_bare)(const char *, int, ...);
+@@ -75,7 +77,7 @@ typedef struct CollectorUtilFuncs
+   FILE *(*popen)(const char *command, const char *mode);
+   int (*putenv)(char *string);
+   ssize_t (*pwrite)();
+-  ssize_t (*pwrite64)();
++  ssize_t (*pwrite64_)();
+   ssize_t (*read)();
+   int (*setenv)(const char *name, const char *value, int overwrite);
+   int (*sigfillset)(sigset_t *set);
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..256e627135b0 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64*|i386*|aarch64*) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From b42a30920c89e9c84932d55417c423c33503add9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 3/4] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From c2197721ecbea7c0dc8ed3d916f4e1acc3557826 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 4/4] build-style/void-cross: update flags for binutils 2.39

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (18 preceding siblings ...)
  2022-09-25  1:20 ` oreo639
@ 2022-09-25  1:43 ` oreo639
  2022-09-25  1:43 ` oreo639
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-25  1:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2025 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 14930 bytes --]

From 229248a984026c0f22d4d05852d131a3224419b5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 1/4] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 8f32bc40a6a4fad4b646fcf9a46182517d5c36b1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 2/4] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From b434f70723e84ea7d5c8082813451be52d1386b1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 3/4] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From fc1cffd865e0aca2f621a46547a863298fae77de Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 4/4] build-style/void-cross: update flags for binutils 2.39

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (19 preceding siblings ...)
  2022-09-25  1:43 ` oreo639
@ 2022-09-25  1:43 ` oreo639
  2022-09-25  1:44 ` oreo639
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-25  1:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2025 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 45282 bytes --]

From 229248a984026c0f22d4d05852d131a3224419b5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/28] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 8f32bc40a6a4fad4b646fcf9a46182517d5c36b1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/28] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From b434f70723e84ea7d5c8082813451be52d1386b1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 03/28] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From fc1cffd865e0aca2f621a46547a863298fae77de Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 04/28] build-style/void-cross: update flags for binutils 2.39

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

From def0f4f6a9a8290d6c5678519eeac561f3a3831d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 05/28] cross-aarch64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..8e76d5e3bdb2 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 3149b08f47ad246598e3fc081287c3ee100a1486 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 06/28] cross-aarch64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..cb2719bd3162 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 214c0f88cbaa27ba952a233daea708543e5d6fe9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 07/28] cross-arm-linux-gnueabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..e607cd4ca6e4 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 546c2d5fba15cd625678ffc066c565ace94ef236 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 08/28] cross-arm-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..d4af41a7f994 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 86aa2e2e0cc7bea8d0dfac23463d17a16077d514 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 09/28] cross-arm-linux-musleabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabi/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..a5294a229cc7 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 9ed689fe2bcae861ca3b7fceaf1f68a87a6f684e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 10/28] cross-arm-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..e307aa153674 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From d8f32d3a7ad0edcdd6b231a9a7832d0e0d6b07a0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 11/28] cross-armv7l-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..2d7b5cb2983d 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From a8be736e65eec74e78cd865593584debc27191a5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 12/28] cross-armv7l-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..e05b3835d6a3 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From c3a7cc6754499b96f1458321baf58177011b112b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 13/28] cross-i686-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-i686-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..2b15505e04ff 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 1f68833ddab8a6980e7fd0c59e2a696070752c8a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 14/28] cross-i686-pc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..06f6210a07f3 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 08f42874f8c408e04313ad7d54757a1e37ff77a3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 15/28] cross-mips-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..8cd4abd1ddca 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 13a41c45ec22d6dbc0d4d4a3732e4d687939aaeb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 16/28] cross-mips-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..0b0fa564b75e 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="hipperson0 <hipperson0@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From cf1d28be6e739d69fb65bcb4739d499e10f10f45 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 17/28] cross-mipsel-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..d380bde73e7c 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From fcc1549a92265d04ac7c393def15e872cb58d7e2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 18/28] cross-mipsel-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..4b7e0d3c63a5 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From bf988c54e966f9ffd5182b12a24baad5712e3a13 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 19/28] cross-powerpc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..bfc435703067 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 7350e9c4f16d2c8fbfd028761edf23a0e230e83a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 20/28] cross-powerpc-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..f14ff19eee8d 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 9900ddd4a475c516edd8c2e19ca10cc0f681a60f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 21/28] cross-powerpc64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..e77a194663f0 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"

From 183d793e59eaef494b8df22831c1e8ce7be7e34e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 22/28] cross-powerpc64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 016f18776a6d..99c5693b8fcb 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From be9e863cfdb6cfe8f8cc74e122d8791d49522eaf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 23/28] cross-powerpc64le-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 463d7e92d20d..4c295a28f938 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"

From 85831718cfdfc37d8307cefeb214706e4dc1eac2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 24/28] cross-powerpc64le-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index c17a3cccfe29..06571aee41c1 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From d9e91554882a75bc98a51595b67df1a2f3302ba3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 25/28] cross-powerpcle-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 9aede3c465ce..545a678406f6 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 6158c6f7a2a4f09508532da8e824a29de59bed9b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 26/28] cross-powerpcle-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index 045cfda987fe..db7a81ffe61f 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From ca0806e911ac9eba94554995bfaa5e98a501397a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 27/28] cross-x86_64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 8918f3c22a1c..9d31bf5f674f 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 043e78868f7755c93c883278f2356f1206990f9a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 28/28] cross-x86_64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..64f765893b53 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (20 preceding siblings ...)
  2022-09-25  1:43 ` oreo639
@ 2022-09-25  1:44 ` oreo639
  2022-10-03  2:52 ` oreo639
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-09-25  1:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 45282 bytes --]

From 229248a984026c0f22d4d05852d131a3224419b5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/28] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 8f32bc40a6a4fad4b646fcf9a46182517d5c36b1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/28] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..7002a308b2ab 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkg-config"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From b434f70723e84ea7d5c8082813451be52d1386b1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 03/28] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From fc1cffd865e0aca2f621a46547a863298fae77de Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 04/28] build-style/void-cross: update flags for binutils 2.39

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

From def0f4f6a9a8290d6c5678519eeac561f3a3831d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 05/28] cross-aarch64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..8e76d5e3bdb2 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 3149b08f47ad246598e3fc081287c3ee100a1486 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 06/28] cross-aarch64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..cb2719bd3162 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 214c0f88cbaa27ba952a233daea708543e5d6fe9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 07/28] cross-arm-linux-gnueabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..e607cd4ca6e4 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 546c2d5fba15cd625678ffc066c565ace94ef236 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 08/28] cross-arm-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..d4af41a7f994 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 86aa2e2e0cc7bea8d0dfac23463d17a16077d514 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 09/28] cross-arm-linux-musleabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabi/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..a5294a229cc7 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 9ed689fe2bcae861ca3b7fceaf1f68a87a6f684e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 10/28] cross-arm-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..e307aa153674 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From d8f32d3a7ad0edcdd6b231a9a7832d0e0d6b07a0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 11/28] cross-armv7l-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..2d7b5cb2983d 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From a8be736e65eec74e78cd865593584debc27191a5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 12/28] cross-armv7l-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..e05b3835d6a3 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From c3a7cc6754499b96f1458321baf58177011b112b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 13/28] cross-i686-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-i686-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..2b15505e04ff 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 1f68833ddab8a6980e7fd0c59e2a696070752c8a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 14/28] cross-i686-pc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..06f6210a07f3 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 08f42874f8c408e04313ad7d54757a1e37ff77a3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 15/28] cross-mips-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..8cd4abd1ddca 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 13a41c45ec22d6dbc0d4d4a3732e4d687939aaeb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 16/28] cross-mips-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..0b0fa564b75e 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="hipperson0 <hipperson0@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From cf1d28be6e739d69fb65bcb4739d499e10f10f45 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 17/28] cross-mipsel-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..d380bde73e7c 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From fcc1549a92265d04ac7c393def15e872cb58d7e2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 18/28] cross-mipsel-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..4b7e0d3c63a5 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From bf988c54e966f9ffd5182b12a24baad5712e3a13 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 19/28] cross-powerpc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..bfc435703067 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 7350e9c4f16d2c8fbfd028761edf23a0e230e83a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 20/28] cross-powerpc-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..f14ff19eee8d 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 9900ddd4a475c516edd8c2e19ca10cc0f681a60f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 21/28] cross-powerpc64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..e77a194663f0 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"

From 183d793e59eaef494b8df22831c1e8ce7be7e34e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 22/28] cross-powerpc64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 016f18776a6d..99c5693b8fcb 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From be9e863cfdb6cfe8f8cc74e122d8791d49522eaf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 23/28] cross-powerpc64le-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 463d7e92d20d..4c295a28f938 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"

From 85831718cfdfc37d8307cefeb214706e4dc1eac2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 24/28] cross-powerpc64le-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index c17a3cccfe29..06571aee41c1 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From d9e91554882a75bc98a51595b67df1a2f3302ba3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 25/28] cross-powerpcle-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 9aede3c465ce..545a678406f6 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 6158c6f7a2a4f09508532da8e824a29de59bed9b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 26/28] cross-powerpcle-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index 045cfda987fe..db7a81ffe61f 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From ca0806e911ac9eba94554995bfaa5e98a501397a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 27/28] cross-x86_64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 8918f3c22a1c..9d31bf5f674f 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 217d5c29081f6f6e9f38877acc929971ad6a334f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 28/28] cross-x86_64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..64f765893b53 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (21 preceding siblings ...)
  2022-09-25  1:44 ` oreo639
@ 2022-10-03  2:52 ` oreo639
  2022-10-03  2:53 ` oreo639
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-10-03  2:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 45279 bytes --]

From 229248a984026c0f22d4d05852d131a3224419b5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/28] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 7fe8098c6a07246a97a79c061fe5fb021e716752 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/28] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..79cd4e2b7c1f 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkgconf"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From aca04931883a54484fc92551ada49271e2b2a4bf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 03/28] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From b60071aed4ccfe5f3513c2fe7072139904c31a6c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 04/28] build-style/void-cross: update flags for binutils 2.39

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

From 376960fbc0fe68ce65496f7a187da2b90947afd7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 05/28] cross-aarch64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..8e76d5e3bdb2 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 94790507e75a7c416d96782d3ca3afabd94010c2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 06/28] cross-aarch64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..cb2719bd3162 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From d88f2e2b6ef04c0b2ba1735b71dc5fde8f9bbdcf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 07/28] cross-arm-linux-gnueabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..e607cd4ca6e4 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From e737015e0826889700a1f96806fca3276dbf6a5b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 08/28] cross-arm-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..d4af41a7f994 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 7bc26b0a8c5da67764f7e86a845c02ef1f079d9e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 09/28] cross-arm-linux-musleabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabi/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..a5294a229cc7 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From d488c5bd8c90e3d1e1ac16235163d3e4251c5610 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 10/28] cross-arm-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..e307aa153674 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 0a9f37b797e45257781d8ff9d4453b0389edb45a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 11/28] cross-armv7l-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..2d7b5cb2983d 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 258ca36002b7236528a0e08f78eea3c308d71c4e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 12/28] cross-armv7l-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..e05b3835d6a3 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 31210026ea049cbf7aaafb2403217d163a38f206 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 13/28] cross-i686-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-i686-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..2b15505e04ff 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 4f9dca6475d43512e3e99a1580ddaa6b83ae075e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 14/28] cross-i686-pc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..06f6210a07f3 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 56d4d5acb1c48a7d61b5bcaf2a917f91258256da Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 15/28] cross-mips-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..8cd4abd1ddca 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From a51727c73f291eb96cd7879360764e6194771b31 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 16/28] cross-mips-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..0b0fa564b75e 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="hipperson0 <hipperson0@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 0fa71729f3ebdb988f319d63ac294057de7df4f3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 17/28] cross-mipsel-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..d380bde73e7c 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 978a4635588c991a668d1ca3519ac130ffcfadc2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 18/28] cross-mipsel-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..4b7e0d3c63a5 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From d5ec45125f64592f550bebdda07b1603855ff3b5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 19/28] cross-powerpc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..bfc435703067 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 11f17efb81153888825c24c4b8d22db217e1895e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 20/28] cross-powerpc-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..f14ff19eee8d 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 69ed64b007db24612c4448e1d08e1a28ee010ad1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 21/28] cross-powerpc64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..e77a194663f0 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"

From 7b94cb31ae72c76c2e29a5f13fde746c1f8c0115 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 22/28] cross-powerpc64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 016f18776a6d..99c5693b8fcb 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 96c6a17094b909a13a5bed82577494ae242af560 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 23/28] cross-powerpc64le-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 463d7e92d20d..4c295a28f938 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"

From ddf0edfed039d6c3df60eaf404eb849e8c93ab55 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 24/28] cross-powerpc64le-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index c17a3cccfe29..06571aee41c1 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 52830d251323bfdf5b8ff39e861282a778e246d3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 25/28] cross-powerpcle-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 9aede3c465ce..545a678406f6 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 3766a1531b1e509af12b8ec06cbdd8cdfb146d23 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 26/28] cross-powerpcle-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index 045cfda987fe..db7a81ffe61f 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 22bdce3d685942ecfc102def3e152f553e681195 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 27/28] cross-x86_64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 8918f3c22a1c..9d31bf5f674f 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From 2caba571d7bdcfaa9003ce77e3aa04c33919580f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 28/28] cross-x86_64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..64f765893b53 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (22 preceding siblings ...)
  2022-10-03  2:52 ` oreo639
@ 2022-10-03  2:53 ` oreo639
  2022-12-17  6:11 ` [PR PATCH] [Closed]: " oreo639
  2022-12-17  6:11 ` oreo639
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-10-03  2:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages binutils
https://github.com/void-linux/void-packages/pull/39312

binutils: update to 2.39. 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39312.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binutils-39312.patch --]
[-- Type: text/x-diff, Size: 45279 bytes --]

From 2ccb7bbb7b6a418d8d4fe70766436e706b4f7a9e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:46:04 -0700
Subject: [PATCH 01/28] libiberty-devel: update to 20220713

---
 srcpkgs/libiberty-devel/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
index 55255dceae8b..ca2d858a7abc 100644
--- a/srcpkgs/libiberty-devel/template
+++ b/srcpkgs/libiberty-devel/template
@@ -1,6 +1,6 @@
 # Template file for 'libiberty-devel'
 pkgname=libiberty-devel
-version=20210106
+version=20220713
 revision=1
 wrksrc=libiberty-${version}
 build_wrksrc=libiberty
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://gcc.gnu.org/"
 distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4
+checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
 conflicts="binutils-devel<=2.35.1_3"
 
 CFLAGS="-fPIC"

From 2a0a76fbc64c22c7f2542d89c592f7b11b113f4e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 03:44:16 -0700
Subject: [PATCH 02/28] binutils: update to 2.39.

---
 ...e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch | 60 -----------------
 .../fix-libcollector-without-java.patch       | 53 +++++++++++++++
 .../patches/ppc64-revert-gnu-attributes.patch | 66 +++++--------------
 srcpkgs/binutils/template                     | 22 +++++--
 4 files changed, 86 insertions(+), 115 deletions(-)
 delete mode 100644 srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
 create mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch

diff --git a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch b/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
deleted file mode 100644
index a55432d83cff..000000000000
--- a/srcpkgs/binutils/patches/1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 16 Nov 2020 06:37:53 -0800
-Subject: [PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
-
-bfdlink.h has
-
-  /* Symbol will be converted from absolute to section-relative.  Set for
-     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
-     outside of an output section statement.  */
-  unsigned int rel_from_abs : 1;
-
-linker.c has
-
-.{* Return TRUE if the symbol described by a linker hash entry H
-.   is going to be absolute.  Linker-script defined symbols can be
-.   converted from absolute to section-relative ones late in the
-.   link.  Use this macro to correctly determine whether the symbol
-.   will actually end up absolute in output.  *}
-.#define bfd_is_abs_symbol(H) \
-.  (((H)->type == bfd_link_hash_defined \
-.    || (H)->type == bfd_link_hash_defweak) \
-.   && bfd_is_abs_section ((H)->u.def.section) \
-.   && !(H)->rel_from_abs)
-.
-
-Set rel_from_abs to 1 for __ehdr_start which will be converted from
-absolute to section-relative in assign_file_positions_for_load_sections.
-
-	PR ld/26869
-	* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
-	__ehdr_start.
-	* testsuite/ld-i386/i386.exp: Run pr26869.
-	* testsuite/ld-i386/pr26869.d: New file.
-	* testsuite/ld-i386/pr26869.s: Likewise.
-
-(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)
----
- ld/ChangeLog                   |  9 +++++++++
- ld/ldelf.c                     |  2 ++
- ld/testsuite/ld-i386/i386.exp  |  1 +
- ld/testsuite/ld-i386/pr26869.d | 14 ++++++++++++++
- ld/testsuite/ld-i386/pr26869.s |  3 +++
- 5 files changed, 29 insertions(+)
- create mode 100644 ld/testsuite/ld-i386/pr26869.d
- create mode 100644 ld/testsuite/ld-i386/pr26869.s
-
-diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bada3ade2d7..831d032fe56 100644
---- a/ld/ldelf.c
-+++ b/ld/ldelf.c
-@@ -1589,6 +1589,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
- 		      (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
- 		      sizeof ehdr_start_save_u);
- 	      ehdr_start->type = bfd_link_hash_defined;
-+	      /* It will be converted to section-relative later.  */
-+	      ehdr_start->rel_from_abs = 1;
- 	      ehdr_start->u.def.section = bfd_abs_section_ptr;
- 	      ehdr_start->u.def.value = 0;
- 	    }
diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
new file mode 100644
index 000000000000..54384875f358
--- /dev/null
+++ b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch
@@ -0,0 +1,53 @@
+From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001
+From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+Date: Wed, 17 Aug 2022 19:55:23 -0700
+Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without
+ java support
+
+gprofng/ChangeLog
+2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+	PR gprofng/29479
+	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
+	java specific code.
+	* libcollector/unwind.c: Likewise.
+---
+ gprofng/libcollector/collector.c | 2 ++
+ gprofng/libcollector/unwind.c    | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
+index 93c9d3330de5..ceff2c1caccb 100644
+--- a/gprofng/libcollector/collector.c
++++ b/gprofng/libcollector/collector.c
+@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or
+   __collector_ext_unwind_key_init (1, NULL);
+ 
+   /* start java attach if suitable */
++#if defined(GPROFNG_JAVA_PROFILING)
+   if (exp_origin == SP_ORIGIN_DBX_ATTACH)
+     __collector_jprofile_start_attach ();
++#endif
+   start_sec_time = CALL_UTIL (time)(NULL);
+   __collector_start_time = collector_interface.getHiResTime ();
+   TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n");
+diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
+index 119243788020..f8e11823c81e 100644
+--- a/gprofng/libcollector/unwind.c
++++ b/gprofng/libcollector/unwind.c
+@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+   int size = max_frame_size;
+ 
+ #define MIN(a,b) ((a)<(b)?(a):(b))
++#if defined(GPROFNG_JAVA_PROFILING)
+   /* get Java info */
+   if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context)
+     {
+@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg)
+ 	  size -= sz;
+ 	}
+     }
++#endif
+ 
+   /* get native stack */
+   if (context)
diff --git a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
index 5de937f4fcce..1c208dd8955c 100644
--- a/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
+++ b/srcpkgs/binutils/patches/ppc64-revert-gnu-attributes.patch
@@ -1,39 +1,24 @@
-From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
+From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
 From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Fri, 30 Oct 2020 16:59:48 -0600
+Date: Tue, 21 Sep 2021 14:53:13 +0000
 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
  libraries"
 
+This revert is needed to avoid wrongly tagging objects with the incompatible
+IBM long double ABI, which is not supported by musl and will result in
+linking errors if used.
+
 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
 ---
- bfd/ChangeLog     | 6 ------
- bfd/elf32-tic6x.c | 3 ---
- ld/ChangeLog      | 6 ------
- ld/ldlang.c       | 9 ++++-----
- 4 files changed, 4 insertions(+), 20 deletions(-)
+ bfd/elf32-tic6x.c |  3 ---
+ ld/ldlang.c       | 10 ++++------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
 
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 9fac12538a..b5461494e8 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1422,12 +1422,6 @@
- 	accessing root.u.def of symbols.  Also check root.u.def.section
- 	is non-NULL.  Reverse tests so as to make the logic positive.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
--	Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	PR 25882
 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
-index b8b916bfd3..91bb6a10b1 100644
+index 5754f3cb860..3ad1d612749 100644
 --- a/bfd/elf32-tic6x.c
 +++ b/bfd/elf32-tic6x.c
-@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
+@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
  
  	case Tag_ABI_PIC:
  	case Tag_ABI_PID:
@@ -43,36 +28,20 @@ index b8b916bfd3..91bb6a10b1 100644
  	  if (out_attr[i].i > in_attr[i].i)
  	    out_attr[i].i = in_attr[i].i;
  	  break;
-diff --git a/ld/ChangeLog b/ld/ChangeLog
-index 4eec7d2977..b93452f70c 100644
---- a/ld/ChangeLog
-+++ b/ld/ChangeLog
-@@ -1319,12 +1319,6 @@
- 	* testsuite/ld-aarch64/farcall-group.d: New test driver.
- 	* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
- 
--2020-05-01  Alan Modra  <amodra@gmail.com>
--
--	PR 25882
--	* ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
--	shared libraries.
--
- 2020-05-01  Alan Modra  <amodra@gmail.com>
- 
- 	* po/BLD-POTFILES.in: Regenerate.
 diff --git a/ld/ldlang.c b/ld/ldlang.c
-index 9977195074..173d8ec349 100644
+index 37b64c89ee1..f13beaef9d9 100644
 --- a/ld/ldlang.c
 +++ b/ld/ldlang.c
-@@ -6972,12 +6972,11 @@ lang_check (void)
+@@ -7071,13 +7071,11 @@ lang_check (void)
  		   bfd_printable_name (input_bfd), input_bfd,
  		   bfd_printable_name (link_info.output_bfd));
  	}
 -
 -      /* If the input bfd has no contents, it shouldn't set the
 -	 private data of the output bfd.  */
--      else if ((input_bfd->flags & DYNAMIC) != 0
--	       || bfd_count_sections (input_bfd) != 0)
+-      else if (!file->flags.just_syms
+-	       && ((input_bfd->flags & DYNAMIC) != 0
+-		   || bfd_count_sections (input_bfd) != 0))
 +      else if (bfd_count_sections (input_bfd))
  	{
 +	  /* If the input bfd has no contents, it shouldn't set the
@@ -82,5 +51,4 @@ index 9977195074..173d8ec349 100644
  
  	  /* If we aren't supposed to warn about mismatched input
 -- 
-2.29.2
-
+2.33.0
diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index 6270f8618c87..79cd4e2b7c1f 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,19 +1,20 @@
 # Template file for 'binutils'
 pkgname=binutils
-version=2.35.1
-revision=4
+version=2.39
+revision=1
 bootstrap=yes
+hostmakedepends="pkgconf"
 makedepends="zlib-devel"
 short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
-checksum=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
+checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="flex perl texinfo"
+	hostmakedepends+=" flex perl texinfo"
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
@@ -44,6 +45,12 @@ do_configure() {
 		conf+=" --host=${XBPS_CROSS_TRIPLET} --with-build-sysroot=${XBPS_CROSS_BASE}"
 	fi
 
+	# gprofng currently only supports x86 and aarch64 glibc.
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64|i386|aarch64) conf+=" --enable-gprofng" ;;
+		*) conf+=" --disable-gprofng" ;;
+	esac
+
 	case "$XBPS_TARGET_MACHINE" in
 		ppc*)
 			conf+=" --enable-secureplt"
@@ -76,13 +83,15 @@ do_configure() {
 		--libdir=/usr/lib \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--sysconfdir=/etc \
 		--disable-werror \
-		--disable-shared \
 		--disable-nls \
+		--enable-shared \
 		--enable-threads \
 		--enable-plugins \
 		--enable-relro \
 		--enable-gold \
+		--enable-new-dtags \
 		--enable-deterministic-archives \
 		--enable-64-bit-bfd \
 		--enable-ld=default \
@@ -142,7 +151,8 @@ binutils-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/libbfd.so"
+		vmove "usr/lib/libopcodes.so"
 	}
 }
 

From 42209c836023174272b8e8f7e9373480bd943e9f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 04:09:00 -0700
Subject: [PATCH 03/28] gdb: resolve conflict with binutils 2.39

---
 srcpkgs/gdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index ff7c9d9a5911..5970402eb27e 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,7 +1,7 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=12.1
-revision=1
+revision=2
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
@@ -48,7 +48,8 @@ vopt_conflict debuginfod static
 
 post_install() {
 	# resolve conflicts with binutils
-	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+	rm -rf ${DESTDIR}/usr/{include,lib}
+	rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec}.info*
 }
 
 gdb-common_package() {

From 5be5dcdf7de11d90c90ef5cb0a99bd476b2c064a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Sep 2022 15:54:51 -0700
Subject: [PATCH 04/28] build-style/void-cross: update flags for binutils 2.39

---
 common/build-style/void-cross.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/build-style/void-cross.sh b/common/build-style/void-cross.sh
index 92f03f8130f5..41b396fcb875 100644
--- a/common/build-style/void-cross.sh
+++ b/common/build-style/void-cross.sh
@@ -53,6 +53,7 @@ _void_cross_build_binutils() {
 		--sbindir=/usr/bin \
 		--libdir=/usr/lib \
 		--libexecdir=/usr/lib \
+		--sysconfdir=/etc \
 		--target=${tgt} \
 		--with-sysroot=/usr/${tgt} \
 		--disable-nls \
@@ -60,8 +61,10 @@ _void_cross_build_binutils() {
 		--disable-multilib \
 		--disable-werror \
 		--disable-gold \
+		--disable-gprofng \
 		--enable-relro \
 		--enable-plugins \
+		--enable-new-dtags \
 		--enable-64-bit-bfd \
 		--enable-deterministic-archives \
 		--enable-default-hash-style=gnu \
@@ -625,6 +628,9 @@ do_install() {
 	# then remove it because it conflicts with libquadmath package
 	rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*
 
+	# Remove libdep linker plugin because it conflicts with system binutils
+	rm -f ${DESTDIR}/usr/lib/bfd-plugins/libdep*
+
 	# Remove leftover symlinks
 	rm -f ${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}
 	rm -f ${DESTDIR}/lib*

From 2560c3a2a52396e84ce6d31760cdbc02b56545bb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 05/28] cross-aarch64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index 18de21aa3ccd..8e76d5e3bdb2 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-aarch64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-aarch64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 0d338d951f8f056e1607d72707c999bfe88e4ef2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 06/28] cross-aarch64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-aarch64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..cb2719bd3162 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-aarch64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-aarch64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv8-a"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From a37ca18a1d68889bddbd467e5b814e0b6379bff5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 07/28] cross-arm-linux-gnueabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabi/template b/srcpkgs/cross-arm-linux-gnueabi/template
index a3aba72aa93a..e607cd4ca6e4 100644
--- a/srcpkgs/cross-arm-linux-gnueabi/template
+++ b/srcpkgs/cross-arm-linux-gnueabi/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabi
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 459b9efc4c2deff90647a4210d681a472308248c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 08/28] cross-arm-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-gnueabihf/template b/srcpkgs/cross-arm-linux-gnueabihf/template
index d9ab86cf2ecc..d4af41a7f994 100644
--- a/srcpkgs/cross-arm-linux-gnueabihf/template
+++ b/srcpkgs/cross-arm-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-arm-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-arm-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From 81cff76fd1360e83ea7727485f1b83a57a3e292d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 09/28] cross-arm-linux-musleabi: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabi/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 6692d891e1bd..a5294a229cc7 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabi'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabi
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv5te --with-float=soft"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From c54cd935bacc8e943c4e29528a9404fa65cb3760 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 10/28] cross-arm-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-arm-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index bb62bd5ebc55..e307aa153674 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-arm-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-arm-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 5492d5121fb4e220b9a59bf74f630b6205c10faf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 11/28] cross-armv7l-linux-gnueabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-gnueabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-gnueabihf/template b/srcpkgs/cross-armv7l-linux-gnueabihf/template
index 30c89b6294ef..2d7b5cb2983d 100644
--- a/srcpkgs/cross-armv7l-linux-gnueabihf/template
+++ b/srcpkgs/cross-armv7l-linux-gnueabihf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-armv7l-linux-gnueabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-armv7l-linux-gnueabihf
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"

From d5e4ba8938e7a3f8424ed3ea0f974160c45923d3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 12/28] cross-armv7l-linux-musleabihf: update to binutils 2.39.

---
 srcpkgs/cross-armv7l-linux-musleabihf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 0a588cdf1a58..e05b3835d6a3 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-armv7l-linux-musleabihf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-armv7l-linux-musleabihf
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 5bd3b32cadb3a10f838a7c02112e7078ecc30ef6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 13/28] cross-i686-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-i686-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..2b15505e04ff 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-i686-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-i686-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 8b580f8de0498e48aa4250f2076a07b56a12069a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 14/28] cross-i686-pc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-i686-pc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-pc-linux-gnu/template b/srcpkgs/cross-i686-pc-linux-gnu/template
index 263a43f7a7b8..06f6210a07f3 100644
--- a/srcpkgs/cross-i686-pc-linux-gnu/template
+++ b/srcpkgs/cross-i686-pc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-i686-pc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-i686-pc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From a6e2a80fb1d5cbc35741d10b07c993ca2cdec977 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 15/28] cross-mips-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..8cd4abd1ddca 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From e6b1a2682852db8d188c2f101bd043082ff8d3ba Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 16/28] cross-mips-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mips-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index d7590af9ec03..0b0fa564b75e 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mips-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mips-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="hipperson0 <hipperson0@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 1ff065b8b6d04d55260ed75832b2e2ac351ab37d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:38 -0700
Subject: [PATCH 17/28] cross-mipsel-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..d380bde73e7c 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=soft
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From b001b704427e2c47e7fe7082cc3242fd4f8c43dc Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 18/28] cross-mipsel-linux-muslhf: update to binutils 2.39.

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index e4a55f028bc4..4b7e0d3c63a5 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-mipsel-linux-muslhf'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-mipsel-linux-muslhf
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--with-arch=mips32r2 --with-float=hard
  --with-linker-hash-style=sysv"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From ca6f70a8d8c91a058edb08dd5e39bead667664fd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 19/28] cross-powerpc-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-gnu/template b/srcpkgs/cross-powerpc-linux-gnu/template
index b97a21d0d72e..bfc435703067 100644
--- a/srcpkgs/cross-powerpc-linux-gnu/template
+++ b/srcpkgs/cross-powerpc-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 4e3807466e9a742e727fd75ee8730e0d8914309f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 20/28] cross-powerpc-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..f14ff19eee8d 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpc-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From cea3289815433bcdc1caed1d9809ac8ee3c93d1f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 21/28] cross-powerpc64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-gnu/template b/srcpkgs/cross-powerpc64-linux-gnu/template
index 35cfcaa6f02e..e77a194663f0 100644
--- a/srcpkgs/cross-powerpc64-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpc-linux"

From 0170af38b304cd9e1c164a6aa76f66a7e1d10962 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 22/28] cross-powerpc64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 016f18776a6d..99c5693b8fcb 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From b0af085fe7f01d1709e99e081cb090e6febb1285 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 23/28] cross-powerpc64le-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-gnu/template b/srcpkgs/cross-powerpc64le-linux-gnu/template
index 463d7e92d20d..4c295a28f938 100644
--- a/srcpkgs/cross-powerpc64le-linux-gnu/template
+++ b/srcpkgs/cross-powerpc64le-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpc64le-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpc64le-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify --with-abi=elfv2
  --enable-targets=powerpcle-linux"

From 4e5621f05297cd50abbf13c034764d05932712b4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 24/28] cross-powerpc64le-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index c17a3cccfe29..06571aee41c1 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,12 +1,12 @@
 # Template file for 'cross-powerpc64le-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-powerpc64le-linux-musl
 version=0.34
-revision=4
+revision=5
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"
@@ -15,8 +15,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 016a0dac52bf0d2afe676bbe3f398d970132f4a8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 25/28] cross-powerpcle-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-gnu/template b/srcpkgs/cross-powerpcle-linux-gnu/template
index 9aede3c465ce..545a678406f6 100644
--- a/srcpkgs/cross-powerpcle-linux-gnu/template
+++ b/srcpkgs/cross-powerpcle-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify"
 hostmakedepends="texinfo tar gcc-objc flex perl python3"

From 4c5201f581757735a16151dacf9a7700f65670eb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 26/28] cross-powerpcle-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-powerpcle-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index 045cfda987fe..db7a81ffe61f 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-powerpcle-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 pkgname=cross-powerpcle-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 configure_args="--enable-secureplt --disable-vtable-verify
  --disable-decimal-float"
@@ -14,8 +14,8 @@ makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

From 2a311e71f0d6d9070700db0a08c526dccb1f1898 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 27/28] cross-x86_64-linux-gnu: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-gnu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-gnu/template b/srcpkgs/cross-x86_64-linux-gnu/template
index 8918f3c22a1c..9d31bf5f674f 100644
--- a/srcpkgs/cross-x86_64-linux-gnu/template
+++ b/srcpkgs/cross-x86_64-linux-gnu/template
@@ -1,11 +1,11 @@
 # Template file for 'cross-x86_64-linux-gnu'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _glibc_version=2.32
 _linux_version=5.10.4
 pkgname=cross-x86_64-linux-gnu
 version=0.34
-revision=1
+revision=2
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"

From e32f77a613ffcc94ec7b092a0d41be10589c9904 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 24 Sep 2022 18:43:39 -0700
Subject: [PATCH 28/28] cross-x86_64-linux-musl: update to binutils 2.39.

---
 srcpkgs/cross-x86_64-linux-musl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..64f765893b53 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,20 +1,20 @@
 # Template file for 'cross-x86_64-linux-musl'
-_binutils_version=2.35.1
+_binutils_version=2.39
 _gcc_version=10.2.1_pre1
 _musl_version=1.1.24
 _linux_version=5.10.4
 _libucontext_version=1.0
 pkgname=cross-x86_64-linux-musl
 version=0.34
-revision=3
+revision=4
 build_style=void-cross
 hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
 makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
 depends="${pkgname}-libc-${version}_${revision}"
 short_desc="Void cross toolchain for ${pkgname/cross-}"
 maintainer="Orphaned <orphan@voidlinux.org>"
-homepage="https://www.voidlinux.org/"
 license="GPL-2.0-or-later, GPL-3.0-or-later, MIT"
+homepage="https://www.voidlinux.org/"
 distfiles="
  ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
  https://dev.alpinelinux.org/~nenolod/gcc-${_gcc_version}.tar.xz

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Closed]: binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (23 preceding siblings ...)
  2022-10-03  2:53 ` oreo639
@ 2022-12-17  6:11 ` oreo639
  2022-12-17  6:11 ` oreo639
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-12-17  6:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]

There's a closed pull request on the void-packages repository

binutils: update to 2.39. 
https://github.com/void-linux/void-packages/pull/39312

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

Most of the testing for this was done as a part of the [gcc12 PR](https://github.com/void-linux/void-packages/pull/34902), this was split on request.

There were some api changes in libfd, the following packages were tested to build against binutils-devel:
- [x] oprofile
- [x] prelink-cross
- [x] kcov
- [x] linux-tools
- [x] distcc
- [x] chroot-distcc
- [x] sbsigntool
- [ ] llvm12 (I can't remember if I tested it with binutils 2.39 or just 2.38, building it takes forever, but it should be fine since afaict it doesn't use libbfd or `dis-asm.h`)
- [x] rpm (doesn't actually use binutils-devel but it is listed in the makedepends, builds fine without it)

Please test this PR before merging.

Closes: https://github.com/void-linux/void-packages/pull/39291

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: binutils: update to 2.39. 
  2022-09-16 10:59 [PR PATCH] Binutils oreo639
                   ` (24 preceding siblings ...)
  2022-12-17  6:11 ` [PR PATCH] [Closed]: " oreo639
@ 2022-12-17  6:11 ` oreo639
  25 siblings, 0 replies; 27+ messages in thread
From: oreo639 @ 2022-12-17  6:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/39312#issuecomment-1356061352

Comment:
Already completed as a part of the gcc 12 PR.

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-12-17  6:11 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-16 10:59 [PR PATCH] Binutils oreo639
2022-09-16 11:09 ` [PR PATCH] [Updated] binutils: update to 2.39 oreo639
2022-09-16 11:17 ` oreo639
2022-09-16 13:28 ` oreo639
2022-09-16 17:46 ` dkwo
2022-09-16 22:44 ` oreo639
2022-09-17  4:09 ` [PR PATCH] [Updated] " oreo639
2022-09-17  4:11 ` oreo639
2022-09-17  4:36 ` oreo639
2022-09-17  5:09 ` oreo639
2022-09-17 11:44 ` dkwo
2022-09-17 11:53 ` dkwo
2022-09-17 12:05 ` paper42
2022-09-18 22:19 ` [PR PATCH] [Updated] " oreo639
2022-09-18 22:37 ` oreo639
2022-09-18 22:39 ` oreo639
2022-09-18 22:59 ` oreo639
2022-09-19  0:27 ` oreo639
2022-09-25  1:12 ` oreo639
2022-09-25  1:20 ` oreo639
2022-09-25  1:43 ` oreo639
2022-09-25  1:43 ` oreo639
2022-09-25  1:44 ` oreo639
2022-10-03  2:52 ` oreo639
2022-10-03  2:53 ` oreo639
2022-12-17  6:11 ` [PR PATCH] [Closed]: " oreo639
2022-12-17  6:11 ` oreo639

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).