mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-14 21:27:01 +02:00
binutils: update to 2.39.
This commit is contained in:
parent
4d9a92671a
commit
d6085dc467
4 changed files with 88 additions and 117 deletions
|
@ -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;
|
||||
}
|
53
srcpkgs/binutils/patches/fix-libcollector-without-java.patch
Normal file
53
srcpkgs/binutils/patches/fix-libcollector-without-java.patch
Normal file
|
@ -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)
|
|
@ -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
|
||||
|
|
|
@ -1,24 +1,26 @@
|
|||
# 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"
|
||||
subpackages+=" binutils-devel"
|
||||
fi
|
||||
nocross=temporarily
|
||||
|
||||
_get_triplet() {
|
||||
if [ -z "$XBPS_TRIPLET" ]; then
|
||||
|
@ -35,15 +37,21 @@ do_configure() {
|
|||
local conf
|
||||
|
||||
if [ "$CHROOT_READY" ]; then
|
||||
conf+=" --with-debuginfod"
|
||||
conf+=" --with-debuginfod --enable-shared"
|
||||
else
|
||||
conf+=" --without-debuginfod --disable-install-libbfd"
|
||||
conf+=" --without-debuginfod --disable-shared --disable-install-libbfd"
|
||||
fi
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
# we don't want --with-sysroot=${XBPS_CROSS_BASE} like gnu-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 +84,14 @@ do_configure() {
|
|||
--libdir=/usr/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--sysconfdir=/etc \
|
||||
--disable-werror \
|
||||
--disable-shared \
|
||||
--disable-nls \
|
||||
--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"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue