summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--9999/0001-Gentoo-gold-ld-add-support-for-poisoned-system-direc.patch88
-rw-r--r--9999/0002-Gentoo-libiberty-install-PIC-version-of-libiberty.a.patch8
-rw-r--r--9999/0003-Gentoo-add-with-extra-soversion-suffix-option.patch (renamed from 9999/0004-Gentoo-add-with-extra-soversion-suffix-option.patch)40
-rw-r--r--9999/0003-Gentoo-opcodes-link-against-libbfd.la-for-rpath-deps.patch49
-rw-r--r--9999/0004-Gentoo-Pass-hash-style-sysv-to-ld-in-the-testsuite.patch (renamed from 9999/0006-Gentoo-Pass-hash-style-sysv.patch)16
-rw-r--r--9999/0005-Gentoo-Give-also-libctf-optionally-a-gentoo-specific.patch (renamed from 9999/0007-Give-also-libctf-optionally-a-gentoo-specific-sovers.patch)94
-rw-r--r--9999/0006-Gentoo-XFAIL-15-broken-ld.gold-tests.patch (renamed from 9999/0020-XFAIL-15-broken-ld.gold-tests.patch)6
-rw-r--r--9999/0008-If-we-use-a-soversion-suffix-then-we-also-use-the-bd.patch111
8 files changed, 144 insertions, 268 deletions
diff --git a/9999/0001-Gentoo-gold-ld-add-support-for-poisoned-system-direc.patch b/9999/0001-Gentoo-gold-ld-add-support-for-poisoned-system-direc.patch
index f7443bf..8e2e947 100644
--- a/9999/0001-Gentoo-gold-ld-add-support-for-poisoned-system-direc.patch
+++ b/9999/0001-Gentoo-gold-ld-add-support-for-poisoned-system-direc.patch
@@ -1,7 +1,7 @@
-From 8a82f64de912f26e840b20eec9d8a463fd0e242b Mon Sep 17 00:00:00 2001
+From 6ad35e463cbd086b4d4e7bb5aca1da6b73e614c8 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Tue, 20 Jul 2021 21:08:31 +0200
-Subject: [PATCH 1/6] Gentoo: gold/ld: add support for poisoned system
+Subject: [PATCH 1/6] Gentoo: gold/ld: add support for poisoned system
directories
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -27,12 +27,13 @@ TEST=x86_64-cros-linux-gnu-ld throws warnings when using -L/lib (gold & bfd)
Reviewed-on: https://chromium-review.googlesource.com/272083
(cherry picked from commit f92dbf35c00ab13cee36f6be8ae5ca46454d9000)
-Ported to binutils 2.37 Andreas K. Hütte <dilfridge@gentoo.org>
+Ported to binutils 2.37 by Andreas K. Hüttel <dilfridge@gentoo.org>
+Ported to binutils 2.39 by WANG Xuerui <xen0n@gentoo.org>
---
gold/options.cc | 33 +++++++++++++++++++++++++++++++++
gold/options.h | 7 +++++++
ld/config.in | 3 +++
- ld/configure | 14 ++++++++++++++
+ ld/configure | 20 ++++++++++++++++++--
ld/configure.ac | 10 ++++++++++
ld/ld.h | 7 +++++++
ld/ld.texi | 18 ++++++++++++++++++
@@ -40,10 +41,10 @@ Ported to binutils 2.37 Andreas K. Hütte <dilfridge@gentoo.org>
ld/ldlex.h | 3 +++
ld/ldmain.c | 7 +++++++
ld/lexsup.c | 24 ++++++++++++++++++++++++
- 11 files changed, 146 insertions(+)
+ 11 files changed, 150 insertions(+), 2 deletions(-)
diff --git a/gold/options.cc b/gold/options.cc
-index 5a55bd8ba6d..f7940c75f5a 100644
+index 04be98a3e39..64439f8af7a 100644
--- a/gold/options.cc
+++ b/gold/options.cc
@@ -1355,6 +1355,39 @@ General_options::finalize()
@@ -87,7 +88,7 @@ index 5a55bd8ba6d..f7940c75f5a 100644
if (this->shared() && this->is_static())
gold_fatal(_("-shared and -static are incompatible"));
diff --git a/gold/options.h b/gold/options.h
-index 757ebf18fec..490b4cbd7d4 100644
+index 9509a445e8e..a3d76b294cd 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -1394,6 +1394,13 @@ class General_options
@@ -105,10 +106,10 @@ index 757ebf18fec..490b4cbd7d4 100644
N_("Warn when skipping an incompatible library"),
N_("Don't warn when skipping an incompatible library"));
diff --git a/ld/config.in b/ld/config.in
-index 26d55a00d47..ffad464783c 100644
+index 0ccd79d59cd..5e39814bce0 100644
--- a/ld/config.in
+++ b/ld/config.in
-@@ -43,6 +43,9 @@
+@@ -55,6 +55,9 @@
language is requested. */
#undef ENABLE_NLS
@@ -119,10 +120,10 @@ index 26d55a00d47..ffad464783c 100644
#undef EXTRA_SHLIB_EXTENSION
diff --git a/ld/configure b/ld/configure
-index c197aaef3cb..882263aa43f 100755
+index 1c2b64870b1..46b5789c77e 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -829,6 +829,7 @@ with_lib_path
+@@ -836,6 +836,7 @@ with_lib_path
enable_targets
enable_64_bit_bfd
with_sysroot
@@ -130,7 +131,7 @@ index c197aaef3cb..882263aa43f 100755
enable_gold
enable_got
enable_compressed_debug_sections
-@@ -1498,6 +1499,8 @@ Optional Features:
+@@ -1514,6 +1515,8 @@ Optional Features:
--enable-checking enable run-time checks
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@@ -139,8 +140,26 @@ index c197aaef3cb..882263aa43f 100755
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
-@@ -15236,7 +15239,18 @@ else
- fi
+@@ -11491,7 +11494,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11494 "configure"
++#line 11497 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11597,7 +11600,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11600 "configure"
++#line 11603 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -15349,6 +15352,19 @@ fi
+
+# Check whether --enable-poison-system-directories was given.
@@ -151,18 +170,19 @@ index c197aaef3cb..882263aa43f 100755
+fi
+
+if test "x${enable_poison_system_directories}" = "xyes"; then
-
++
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
+
+fi
-
- # Check whether --enable-got was given.
- if test "${enable_got+set}" = set; then :
++
+ # Check whether --enable-gold was given.
+ if test "${enable_gold+set}" = set; then :
+ enableval=$enable_gold; case "${enableval}" in
diff --git a/ld/configure.ac b/ld/configure.ac
-index 8ea97c43cd4..0f246db67d8 100644
+index eb55904c090..0844c2364c5 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
-@@ -106,6 +106,16 @@ AC_SUBST(use_sysroot)
+@@ -102,6 +102,16 @@ AC_SUBST(use_sysroot)
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
@@ -180,7 +200,7 @@ index 8ea97c43cd4..0f246db67d8 100644
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
diff --git a/ld/ld.h b/ld/ld.h
-index 35fafebfaed..4152278b8f4 100644
+index f3086bf30de..90cf1ca51e5 100644
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -162,6 +162,13 @@ typedef struct
@@ -198,13 +218,13 @@ index 35fafebfaed..4152278b8f4 100644
enum endian_enum endian;
diff --git a/ld/ld.texi b/ld/ld.texi
-index dd8f571d4e4..0aee4a4e9f1 100644
+index eabbec8faa9..45f4858526c 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
-@@ -2863,6 +2863,24 @@ string identifying the original linked file does not change.
-
- Passing @code{none} for @var{style} disables the setting from any
- @code{--build-id} options earlier on the command line.
+@@ -2947,6 +2947,24 @@ creation of the metadata note, if one had been enabled by an earlier
+ occurrence of the --package-metdata option.
+ If the linker has been built with libjansson, then the JSON string
+ will be validated.
+
+@kindex --warn-poison-system-directories
+@item --warn-poison-system-directories
@@ -227,7 +247,7 @@ index dd8f571d4e4..0aee4a4e9f1 100644
@c man end
diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 9d0af06f1f6..f4a83acca93 100644
+index 731ae5f7aed..6b67e29041b 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -117,6 +117,26 @@ ldfile_add_library_path (const char *name, bool cmdline)
@@ -258,10 +278,10 @@ index 9d0af06f1f6..f4a83acca93 100644
/* Try to open a BFD for a lang_input_statement. */
diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 9e8bf5fb835..3baed822a22 100644
+index 57ade1f754b..b35a6122e09 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
-@@ -148,6 +148,9 @@ enum option_values
+@@ -149,6 +149,9 @@ enum option_values
OPTION_PRINT_OUTPUT_FORMAT,
OPTION_PRINT_SYSROOT,
OPTION_IGNORE_UNRESOLVED_SYMBOL,
@@ -272,7 +292,7 @@ index 9e8bf5fb835..3baed822a22 100644
OPTION_POP_STATE,
OPTION_DISABLE_MULTIPLE_DEFS_ABS,
diff --git a/ld/ldmain.c b/ld/ldmain.c
-index 42660eb9a3c..c78009b760c 100644
+index ea72b14a301..706ec9ce26e 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -321,6 +321,13 @@ main (int argc, char **argv)
@@ -290,10 +310,10 @@ index 42660eb9a3c..c78009b760c 100644
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
diff --git a/ld/lexsup.c b/ld/lexsup.c
-index 00274c500d0..a19cce9967c 100644
+index 9225f71b3ce..db5b170bc7c 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
-@@ -566,6 +566,18 @@ static const struct ld_option ld_options[] =
+@@ -579,6 +579,18 @@ static const struct ld_option ld_options[] =
OPTION_IGNORE_UNRESOLVED_SYMBOL},
'\0', N_("SYMBOL"),
N_("Unresolved SYMBOL will not cause an error or warning"), TWO_DASHES },
@@ -312,7 +332,7 @@ index 00274c500d0..a19cce9967c 100644
{ {"push-state", no_argument, NULL, OPTION_PUSH_STATE},
'\0', NULL, N_("Push state of flags governing input file handling"),
TWO_DASHES },
-@@ -1643,6 +1655,18 @@ parse_args (unsigned argc, char **argv)
+@@ -1679,6 +1691,18 @@ parse_args (unsigned argc, char **argv)
}
break;
@@ -332,5 +352,5 @@ index 00274c500d0..a19cce9967c 100644
input_flags.pushed = xmemdup (&input_flags,
sizeof (input_flags),
--
-2.31.1
+2.35.1
diff --git a/9999/0002-Gentoo-libiberty-install-PIC-version-of-libiberty.a.patch b/9999/0002-Gentoo-libiberty-install-PIC-version-of-libiberty.a.patch
index 4d5ed11..34462cc 100644
--- a/9999/0002-Gentoo-libiberty-install-PIC-version-of-libiberty.a.patch
+++ b/9999/0002-Gentoo-libiberty-install-PIC-version-of-libiberty.a.patch
@@ -1,4 +1,4 @@
-From 6536761c1e2756ec39fdc33c400757be3744510c Mon Sep 17 00:00:00 2001
+From 4bd606f5945ea94b1ea0db8fba206cfe67959cde Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Fri, 7 Jan 2005 00:15:53 -0500
Subject: [PATCH 2/6] Gentoo: libiberty: install PIC version of libiberty.a
@@ -18,10 +18,10 @@ general are fairly low, and we'd rather have things work for all of them.
1 file changed, 1 insertion(+)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index d19e14a2aca..cd02be1c2fb 100644
+index abef3c4601b..9dfb6b6d2b0 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
-@@ -257,6 +257,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
+@@ -258,6 +258,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
$(AR) $(AR_FLAGS) $(TARGETLIB) \
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
$(RANLIB) $(TARGETLIB); \
@@ -30,5 +30,5 @@ index d19e14a2aca..cd02be1c2fb 100644
else true; fi; \
if [ x"$(NOASANFLAG)" != x ]; then \
--
-2.31.1
+2.35.1
diff --git a/9999/0004-Gentoo-add-with-extra-soversion-suffix-option.patch b/9999/0003-Gentoo-add-with-extra-soversion-suffix-option.patch
index 1051543..9328241 100644
--- a/9999/0004-Gentoo-add-with-extra-soversion-suffix-option.patch
+++ b/9999/0003-Gentoo-add-with-extra-soversion-suffix-option.patch
@@ -1,7 +1,7 @@
-From 235f1f862fb9bf77e2b9f62c24db0ca801c4a057 Mon Sep 17 00:00:00 2001
+From 2d3d27e6c5ad343a524a117dc02358ad7cb06e0d Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Tue, 20 Jul 2021 21:12:38 +0200
-Subject: [PATCH 4/6] Gentoo: add --with-extra-soversion-suffix= option
+Subject: [PATCH 3/6] Gentoo: add --with-extra-soversion-suffix= option
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -25,7 +25,7 @@ built with different flags (see https://bugs.gentoo.org/663690).
Bug: https://bugs.gentoo.org/666100
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-Ported to binutils 2.37 Andreas K. Hüttel <dilfridge@gentoo.org>
+Ported to binutils 2.37 by Andreas K. Hüttel <dilfridge@gentoo.org>
---
bfd/Makefile.am | 5 +++++
bfd/Makefile.in | 4 ++++
@@ -34,10 +34,10 @@ Ported to binutils 2.37 Andreas K. Hüttel <dilfridge@gentoo.org>
4 files changed, 29 insertions(+)
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
-index ed2f701805d..dab3bfc8ed7 100644
+index 670e0598f55..18d6eef60bb 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
-@@ -59,6 +59,8 @@ bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
+@@ -64,6 +64,8 @@ bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
LIBDL = @lt_cv_dlopen_libs@
endif
@@ -46,7 +46,7 @@ index ed2f701805d..dab3bfc8ed7 100644
# bfd.h goes here, for now
BFD_H = bfd.h
-@@ -952,6 +954,9 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
+@@ -983,6 +985,9 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
fi ;\
@@ -57,10 +57,10 @@ index ed2f701805d..dab3bfc8ed7 100644
-e "s,@bfd_version_string@,$$bfd_version_string," \
-e "s,@bfd_version_package@,$$bfd_version_package," \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
-index 12807d99760..572df143487 100644
+index d3ef4c2524b..56fac1bb94d 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
-@@ -318,6 +318,7 @@ ECHO_T = @ECHO_T@
+@@ -354,6 +354,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
@@ -68,7 +68,7 @@ index 12807d99760..572df143487 100644
FGREP = @FGREP@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
-@@ -2063,6 +2064,9 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
+@@ -2453,6 +2454,9 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
fi ;\
@@ -79,18 +79,18 @@ index 12807d99760..572df143487 100644
-e "s,@bfd_version_string@,$$bfd_version_string," \
-e "s,@bfd_version_package@,$$bfd_version_package," \
diff --git a/bfd/configure b/bfd/configure
-index 41586f00f93..f0acf160913 100755
+index 590986efb61..299f7bb0244 100755
--- a/bfd/configure
+++ b/bfd/configure
-@@ -696,6 +696,7 @@ WARN_CFLAGS
+@@ -691,6 +691,7 @@ WARN_CFLAGS
REPORT_BUGS_TEXI
REPORT_BUGS_TO
PKGVERSION
+EXTRA_SOVERSION_SUFFIX
DEBUGDIR
- PLUGINS_FALSE
- PLUGINS_TRUE
-@@ -835,6 +836,7 @@ enable_secureplt
+ ENABLE_BFD_64_BIT_FALSE
+ ENABLE_BFD_64_BIT_TRUE
+@@ -832,6 +833,7 @@ enable_secureplt
enable_separate_code
enable_leading_mingw64_underscores
with_separate_debug_dir
@@ -98,7 +98,7 @@ index 41586f00f93..f0acf160913 100755
with_pkgversion
with_bugurl
enable_werror
-@@ -1511,6 +1513,8 @@ Optional Packages:
+@@ -1508,6 +1510,8 @@ Optional Packages:
--with-separate-debug-dir=DIR
Look for global separate debug info in DIR
[[default=LIBDIR/debug]]
@@ -107,7 +107,7 @@ index 41586f00f93..f0acf160913 100755
--with-pkgversion=PKG Use PKG in the version string in place of "GNU
Binutils"
--with-bugurl=URL Direct users to URL to report a bug
-@@ -11913,6 +11917,15 @@ fi
+@@ -12014,6 +12018,15 @@ fi
@@ -124,10 +124,10 @@ index 41586f00f93..f0acf160913 100755
# Check whether --with-pkgversion was given.
diff --git a/bfd/configure.ac b/bfd/configure.ac
-index fec067b2135..8c9ef9a04c0 100644
+index aad4f3c83a5..e9158315bf1 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
-@@ -169,6 +169,13 @@ AC_ARG_WITH(separate-debug-dir,
+@@ -168,6 +168,13 @@ AC_ARG_WITH(separate-debug-dir,
[DEBUGDIR="${withval}"])
AC_SUBST(DEBUGDIR)
@@ -139,8 +139,8 @@ index fec067b2135..8c9ef9a04c0 100644
+AC_SUBST(EXTRA_SOVERSION_SUFFIX)
+
ACX_PKGVERSION([GNU Binutils])
- ACX_BUGURL([https://www.sourceware.org/bugzilla/])
+ ACX_BUGURL([https://sourceware.org/bugzilla/])
--
-2.31.1
+2.35.1
diff --git a/9999/0003-Gentoo-opcodes-link-against-libbfd.la-for-rpath-deps.patch b/9999/0003-Gentoo-opcodes-link-against-libbfd.la-for-rpath-deps.patch
deleted file mode 100644
index f3c9f8e..0000000
--- a/9999/0003-Gentoo-opcodes-link-against-libbfd.la-for-rpath-deps.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From c55536c61ec7e4c2e983e15f51f56f7a7c340889 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 5 Jul 2016 20:24:00 +0545
-Subject: [PATCH 3/6] Gentoo: opcodes: link against libbfd.la for rpath deps
-
-The reason opcodes doesn't link against libbfd.la is to workaround a
-libtool bug where it uses installed -L paths ahead of DESTDIR paths.
-The downside is that the library itself lacks rpath tags to find the
-right version of libbfd.so.
-
-Since Gentoo has patched the libtool bug for a while, we don't need
-the workaround. Use the .la file so we get the rpath tags.
-
-URL: https://bugs.gentoo.org/563934
-(cherry picked from commit 662586237b0b00ee881e79b56f6234ff36e8bfe6)
----
- opcodes/configure | 2 +-
- opcodes/configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/opcodes/configure b/opcodes/configure
-index a3da5987f1b..22a05245286 100755
---- a/opcodes/configure
-+++ b/opcodes/configure
-@@ -12142,7 +12142,7 @@ if test "$enable_shared" = "yes"; then
- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}"
- ;;
- *)
-- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}"
-+ SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}"
- ;;
- esac
- SHARED_DEPENDENCIES="../bfd/libbfd.la"
-diff --git a/opcodes/configure.ac b/opcodes/configure.ac
-index e564f067334..fb6254cd69d 100644
---- a/opcodes/configure.ac
-+++ b/opcodes/configure.ac
-@@ -203,7 +203,7 @@ if test "$enable_shared" = "yes"; then
- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}"
- ;;
- *)
-- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}"
-+ SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}"
- ;;
- esac
- SHARED_DEPENDENCIES="../bfd/libbfd.la"
---
-2.31.1
-
diff --git a/9999/0006-Gentoo-Pass-hash-style-sysv.patch b/9999/0004-Gentoo-Pass-hash-style-sysv-to-ld-in-the-testsuite.patch
index 41b6a33..caaf9c7 100644
--- a/9999/0006-Gentoo-Pass-hash-style-sysv.patch
+++ b/9999/0004-Gentoo-Pass-hash-style-sysv-to-ld-in-the-testsuite.patch
@@ -1,7 +1,7 @@
-From 905bf3c180f4f7fd07024eb9ff7851898593f3f8 Mon Sep 17 00:00:00 2001
+From 19d0d0a3fca319b6a14888ce709a75d9b0765561 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
Date: Tue, 20 Jul 2021 21:15:24 +0200
-Subject: [PATCH 6/6] Gentoo: Pass --hash-style=sysv to ld in the testsuite
+Subject: [PATCH 4/6] Gentoo: Pass --hash-style=sysv to ld in the testsuite
---
binutils/testsuite/lib/binutils-common.exp | 2 +-
@@ -9,10 +9,10 @@ Subject: [PATCH 6/6] Gentoo: Pass --hash-style=sysv to ld in the testsuite
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
-index 59e25df99b0..401a05b5c32 100644
+index ccc33a827b4..f7aecf7edc2 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
-@@ -1279,7 +1279,7 @@ proc run_dump_test { name {extra_options {}} } {
+@@ -1310,7 +1310,7 @@ proc run_dump_test { name {extra_options {}} } {
# Add -L$srcdir/$subdir so that the linker command can use
# linker scripts in the source directory.
@@ -22,10 +22,10 @@ index 59e25df99b0..401a05b5c32 100644
# If needed then check for, or add a -Map option.
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
-index 8fd14afc63e..adbeaa3bd08 100644
+index ec27388a72e..fc7292a40a7 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
-@@ -167,7 +167,7 @@ proc default_ld_relocate { ld target objects } {
+@@ -171,7 +171,7 @@ proc default_ld_relocate { ld target objects } {
global HOSTING_EMU
remote_file host delete $target
@@ -34,7 +34,7 @@ index 8fd14afc63e..adbeaa3bd08 100644
}
# Check to see if ld is being invoked with a non-endian output format
-@@ -198,8 +198,20 @@ proc default_ld_link { ld target objects } {
+@@ -202,8 +202,20 @@ proc default_ld_link { ld target objects } {
set flags [big_or_little_endian]
}
@@ -57,5 +57,5 @@ index 8fd14afc63e..adbeaa3bd08 100644
# We don't care if we get a warning about a non-existent start
--
-2.31.1
+2.35.1
diff --git a/9999/0007-Give-also-libctf-optionally-a-gentoo-specific-sovers.patch b/9999/0005-Gentoo-Give-also-libctf-optionally-a-gentoo-specific.patch
index 6f1c6b3..4788ee0 100644
--- a/9999/0007-Give-also-libctf-optionally-a-gentoo-specific-sovers.patch
+++ b/9999/0005-Gentoo-Give-also-libctf-optionally-a-gentoo-specific.patch
@@ -1,29 +1,31 @@
-From d3cd41f5c7e405a8db5e85a7be9dfc42d44ef1b8 Mon Sep 17 00:00:00 2001
+From ebc2d6f6c6d46a7fe77a37612ea0e12dccc467cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
Date: Sat, 24 Jul 2021 15:20:16 +0200
-Subject: [PATCH 1/2] Give also libctf optionally a gentoo-specific soversion
+Subject: [PATCH 5/6] Gentoo: Give also libctf optionally a gentoo-specific
+ soversion
---
- libctf/Makefile.am | 13 ++++++++++++-
- libctf/Makefile.in | 8 +++++++-
- libctf/configure | 31 +++++++++++++++++++++++++++++--
- libctf/configure.ac | 8 ++++++++
- 4 files changed, 56 insertions(+), 4 deletions(-)
+ libctf/Makefile.am | 14 +++++++++++++-
+ libctf/Makefile.in | 9 ++++++++-
+ libctf/configure | 35 +++++++++++++++++++++++++++++++++--
+ libctf/configure.ac | 10 ++++++++++
+ 4 files changed, 64 insertions(+), 4 deletions(-)
diff --git a/libctf/Makefile.am b/libctf/Makefile.am
-index e586d25fb37..eabc7fa8394 100644
+index 27e90f0ba36..4990a20efa3 100644
--- a/libctf/Makefile.am
+++ b/libctf/Makefile.am
-@@ -21,6 +21,8 @@ ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
-
- AUTOMAKE_OPTIONS = dejagnu foreign no-texinfo.tex
+@@ -26,6 +26,9 @@ info_TEXINFOS =
+ DISTCLEANFILES =
+ MAINTAINERCLEANFILES =
+EXTRA_SOVERSION_SUFFIX = @EXTRA_SOVERSION_SUFFIX@
++BFD_VERSION = @BFD_VERSION@
+
# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
# -I../zlib, unless we were configured with --with-system-zlib, in which
# case both are empty.
-@@ -41,8 +43,17 @@ include_HEADERS =
+@@ -46,8 +49,17 @@ include_HEADERS =
noinst_LTLIBRARIES = libctf.la libctf-nobfd.la
endif
@@ -31,22 +33,30 @@ index e586d25fb37..eabc7fa8394 100644
+# a supplement to the soversion. So we need to switch tracks and be creative.
+
+if HAVE_EXTRA_SOVERSION_SUFFIX
-+gentoo_ctf_soversion = 0.0.0.$(EXTRA_SOVERSION_SUFFIX)
++gentoo_ctf_soversion = "$(BFD_VERSION).$(EXTRA_SOVERSION_SUFFIX)"
+else
+gentoo_ctf_soversion = 0.0.0
+endif
+
libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB)
--libctf_nobfd_la_LDFLAGS = -version-info 0:0:0 @SHARED_LDFLAGS@ @VERSION_FLAGS@
-+libctf_nobfd_la_LDFLAGS = -release $(gentoo_ctf_soversion) @SHARED_LDFLAGS@ @VERSION_FLAGS@
+-libctf_ldflags_nover = -version-info 0:0:0 @SHARED_LDFLAGS@
++libctf_ldflags_nover = -release $(gentoo_ctf_soversion) @SHARED_LDFLAGS@
+ libctf_nobfd_la_LDFLAGS = $(libctf_ldflags_nover) @VERSION_FLAGS_NOBFD@
libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1
libctf_nobfd_la_SOURCES = ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c \
- ctf-hash.c ctf-labels.c ctf-dedup.c ctf-link.c ctf-lookup.c \
diff --git a/libctf/Makefile.in b/libctf/Makefile.in
-index 5cfa100f9cc..b528781af97 100644
+index 1984f50867a..55772ba94b3 100644
--- a/libctf/Makefile.in
+++ b/libctf/Makefile.in
-@@ -338,6 +338,7 @@ EXEEXT = @EXEEXT@
+@@ -381,6 +381,7 @@ AUTOCONF = @AUTOCONF@
+ AUTOHEADER = @AUTOHEADER@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
++BFD_VERSION = @BFD_VERSION@
+ CATALOGS = @CATALOGS@
+ CATOBJEXT = @CATOBJEXT@
+ CC = @CC@
+@@ -403,6 +404,7 @@ EXEEXT = @EXEEXT@
# Setup the testing framework, if you have one
EXPECT = expect
@@ -54,7 +64,7 @@ index 5cfa100f9cc..b528781af97 100644
FGREP = @FGREP@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
-@@ -469,8 +470,13 @@ AM_CFLAGS = -std=gnu99 @ac_libctf_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @
+@@ -540,8 +542,13 @@ AM_CFLAGS = -std=gnu99 @ac_libctf_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @
@INSTALL_LIBBFD_FALSE@include_HEADERS =
@INSTALL_LIBBFD_TRUE@include_HEADERS = $(INCDIR)/ctf.h $(INCDIR)/ctf-api.h
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libctf.la libctf-nobfd.la
@@ -62,28 +72,29 @@ index 5cfa100f9cc..b528781af97 100644
+
+# libctf by default uses libtool versioning. Unfortunately that keeps us from adding
+# a supplement to the soversion. So we need to switch tracks and be creative.
-+@HAVE_EXTRA_SOVERSION_SUFFIX_TRUE@gentoo_ctf_soversion = 0.0.0.$(EXTRA_SOVERSION_SUFFIX)
++@HAVE_EXTRA_SOVERSION_SUFFIX_TRUE@gentoo_ctf_soversion = "$(BFD_VERSION).$(EXTRA_SOVERSION_SUFFIX)"
libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB)
--libctf_nobfd_la_LDFLAGS = -version-info 0:0:0 @SHARED_LDFLAGS@ @VERSION_FLAGS@
-+libctf_nobfd_la_LDFLAGS = -release $(gentoo_ctf_soversion) @SHARED_LDFLAGS@ @VERSION_FLAGS@
+-libctf_ldflags_nover = -version-info 0:0:0 @SHARED_LDFLAGS@
++libctf_ldflags_nover = -release $(gentoo_ctf_soversion) @SHARED_LDFLAGS@
+ libctf_nobfd_la_LDFLAGS = $(libctf_ldflags_nover) @VERSION_FLAGS_NOBFD@
libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1
libctf_nobfd_la_SOURCES = ctf-archive.c ctf-dump.c ctf-create.c \
- ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-dedup.c \
diff --git a/libctf/configure b/libctf/configure
-index 82bcf13a606..e961f637a69 100755
+index 8704bc215f4..de99d1714d7 100755
--- a/libctf/configure
+++ b/libctf/configure
-@@ -643,6 +643,9 @@ CTF_LIBADD
- SHARED_LDFLAGS
+@@ -646,6 +646,10 @@ BUILD_INFO_FALSE
+ BUILD_INFO_TRUE
NEED_CTF_QSORT_R_FALSE
NEED_CTF_QSORT_R_TRUE
++BFD_VERSION
+HAVE_EXTRA_SOVERSION_SUFFIX_FALSE
+HAVE_EXTRA_SOVERSION_SUFFIX_TRUE
+EXTRA_SOVERSION_SUFFIX
ENABLE_LIBCTF_HASH_DEBUGGING_FALSE
ENABLE_LIBCTF_HASH_DEBUGGING_TRUE
zlibinc
-@@ -804,6 +807,7 @@ enable_maintainer_mode
+@@ -807,6 +811,7 @@ enable_maintainer_mode
enable_install_libbfd
with_system_zlib
enable_libctf_hash_debugging
@@ -91,7 +102,7 @@ index 82bcf13a606..e961f637a69 100755
'
ac_precious_vars='build_alias
host_alias
-@@ -1461,6 +1465,8 @@ Optional Packages:
+@@ -1464,6 +1469,8 @@ Optional Packages:
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-system-zlib use installed libz
@@ -100,25 +111,25 @@ index 82bcf13a606..e961f637a69 100755
Some influential environment variables:
CC C compiler command
-@@ -11586,7 +11592,7 @@ else
+@@ -11635,7 +11642,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
--#line 11589 "configure"
-+#line 11607 "configure"
+-#line 11638 "configure"
++#line 11645 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-@@ -11692,7 +11698,7 @@ else
+@@ -11741,7 +11748,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
--#line 11695 "configure"
-+#line 11713 "configure"
+-#line 11744 "configure"
++#line 11751 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-@@ -12899,6 +12905,23 @@ else
+@@ -12948,6 +12955,26 @@ else
fi
@@ -139,10 +150,13 @@ index 82bcf13a606..e961f637a69 100755
+fi
+
+
++BFD_VERSION=$(${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p')
++
++
# Similar to GDB_AC_CHECK_BFD.
OLD_CFLAGS=$CFLAGS
OLD_LDFLAGS=$LDFLAGS
-@@ -13657,6 +13680,10 @@ if test -z "${ENABLE_LIBCTF_HASH_DEBUGGING_TRUE}" && test -z "${ENABLE_LIBCTF_HA
+@@ -13840,6 +13867,10 @@ if test -z "${ENABLE_LIBCTF_HASH_DEBUGGING_TRUE}" && test -z "${ENABLE_LIBCTF_HA
as_fn_error $? "conditional \"ENABLE_LIBCTF_HASH_DEBUGGING\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
@@ -154,10 +168,10 @@ index 82bcf13a606..e961f637a69 100755
if test -z "${NEED_CTF_QSORT_R_TRUE}" && test -z "${NEED_CTF_QSORT_R_FALSE}"; then
as_fn_error $? "conditional \"NEED_CTF_QSORT_R\" was never defined.
diff --git a/libctf/configure.ac b/libctf/configure.ac
-index 80644b89d67..f7e6180afd8 100644
+index 4996edd5b70..103fc8b9d33 100644
--- a/libctf/configure.ac
+++ b/libctf/configure.ac
-@@ -77,6 +77,14 @@ if test "${enable_libctf_hash_debugging}" = yes; then
+@@ -78,6 +78,16 @@ if test "${enable_libctf_hash_debugging}" = yes; then
fi
AM_CONDITIONAL(ENABLE_LIBCTF_HASH_DEBUGGING, test "${enable_libctf_hash_debugging}" = yes)
@@ -169,9 +183,11 @@ index 80644b89d67..f7e6180afd8 100644
+AC_SUBST(EXTRA_SOVERSION_SUFFIX)
+AM_CONDITIONAL([HAVE_EXTRA_SOVERSION_SUFFIX], [test -n "${with_extra_soversion_suffix}"])
+
++AC_SUBST(BFD_VERSION, $(${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p'), [Version of the accompanying bfd linker])
++
# Similar to GDB_AC_CHECK_BFD.
OLD_CFLAGS=$CFLAGS
OLD_LDFLAGS=$LDFLAGS
--
-2.31.1
+2.35.1
diff --git a/9999/0020-XFAIL-15-broken-ld.gold-tests.patch b/9999/0006-Gentoo-XFAIL-15-broken-ld.gold-tests.patch
index 777390f..318552c 100644
--- a/9999/0020-XFAIL-15-broken-ld.gold-tests.patch
+++ b/9999/0006-Gentoo-XFAIL-15-broken-ld.gold-tests.patch
@@ -1,7 +1,7 @@
-From 6f9a3d6ffa2bcf91bc047055848591dab77c0f11 Mon Sep 17 00:00:00 2001
+From 7eefd99e98a9396f0ce2e98e9bd86bfeb53a84dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
Date: Sat, 31 Jul 2021 01:18:18 +0200
-Subject: [PATCH] Gentoo: XFAIL 15 broken ld.gold tests
+Subject: [PATCH 6/6] Gentoo: XFAIL 15 broken ld.gold tests
It seems like either the tests or ld.gold in general cannot handle
compilers built with --enable-default-pie. No fix yet, so let's ignore
@@ -73,5 +73,5 @@ index 7b4b7832d38..765c2b73140 100644
AUTOMAKE_OPTIONS = foreign -Wno-portability
--
-2.31.1
+2.35.1
diff --git a/9999/0008-If-we-use-a-soversion-suffix-then-we-also-use-the-bd.patch b/9999/0008-If-we-use-a-soversion-suffix-then-we-also-use-the-bd.patch
deleted file mode 100644
index b88f50e..0000000
--- a/9999/0008-If-we-use-a-soversion-suffix-then-we-also-use-the-bd.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 235448cc5c53641417e17fd39ced95a21053c8ca Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
-Date: Sat, 24 Jul 2021 19:25:32 +0200
-Subject: [PATCH 2/2] If we use a soversion suffix, then we also use the bdf
- version as soversion
-
----
- libctf/Makefile.am | 3 ++-
- libctf/Makefile.in | 3 ++-
- libctf/configure | 8 ++++++--
- libctf/configure.ac | 2 ++
- 4 files changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/libctf/Makefile.am b/libctf/Makefile.am
-index eabc7fa8394..e1304e8e89b 100644
---- a/libctf/Makefile.am
-+++ b/libctf/Makefile.am
-@@ -22,6 +22,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
- AUTOMAKE_OPTIONS = dejagnu foreign no-texinfo.tex
-
- EXTRA_SOVERSION_SUFFIX = @EXTRA_SOVERSION_SUFFIX@
-+BFD_VERSION = @BFD_VERSION@
-
- # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
- # -I../zlib, unless we were configured with --with-system-zlib, in which
-@@ -47,7 +48,7 @@ endif
- # a supplement to the soversion. So we need to switch tracks and be creative.
-
- if HAVE_EXTRA_SOVERSION_SUFFIX
--gentoo_ctf_soversion = 0.0.0.$(EXTRA_SOVERSION_SUFFIX)
-+gentoo_ctf_soversion = "$(BFD_VERSION).$(EXTRA_SOVERSION_SUFFIX)"
- else
- gentoo_ctf_soversion = 0.0.0
- endif
-diff --git a/libctf/Makefile.in b/libctf/Makefile.in
-index b528781af97..18d482411e8 100644
---- a/libctf/Makefile.in
-+++ b/libctf/Makefile.in
-@@ -316,6 +316,7 @@ AUTOCONF = @AUTOCONF@
- AUTOHEADER = @AUTOHEADER@
- AUTOMAKE = @AUTOMAKE@
- AWK = @AWK@
-+BFD_VERSION = @BFD_VERSION@
- CATALOGS = @CATALOGS@
- CATOBJEXT = @CATOBJEXT@
- CC = @CC@
-@@ -474,7 +475,7 @@ AM_CFLAGS = -std=gnu99 @ac_libctf_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @
-
- # libctf by default uses libtool versioning. Unfortunately that keeps us from adding
- # a supplement to the soversion. So we need to switch tracks and be creative.
--@HAVE_EXTRA_SOVERSION_SUFFIX_TRUE@gentoo_ctf_soversion = 0.0.0.$(EXTRA_SOVERSION_SUFFIX)
-+@HAVE_EXTRA_SOVERSION_SUFFIX_TRUE@gentoo_ctf_soversion = "$(BFD_VERSION).$(EXTRA_SOVERSION_SUFFIX)"
- libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB)
- libctf_nobfd_la_LDFLAGS = -release $(gentoo_ctf_soversion) @SHARED_LDFLAGS@ @VERSION_FLAGS@
- libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1
-diff --git a/libctf/configure b/libctf/configure
-index e961f637a69..520d3a5cb3e 100755
---- a/libctf/configure
-+++ b/libctf/configure
-@@ -643,6 +643,7 @@ CTF_LIBADD
- SHARED_LDFLAGS
- NEED_CTF_QSORT_R_FALSE
- NEED_CTF_QSORT_R_TRUE
-+BFD_VERSION
- HAVE_EXTRA_SOVERSION_SUFFIX_FALSE
- HAVE_EXTRA_SOVERSION_SUFFIX_TRUE
- EXTRA_SOVERSION_SUFFIX
-@@ -11592,7 +11593,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11607 "configure"
-+#line 11608 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11698,7 +11699,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11713 "configure"
-+#line 11714 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -12922,6 +12923,9 @@ else
- fi
-
-
-+BFD_VERSION=$(${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p')
-+
-+
- # Similar to GDB_AC_CHECK_BFD.
- OLD_CFLAGS=$CFLAGS
- OLD_LDFLAGS=$LDFLAGS
-diff --git a/libctf/configure.ac b/libctf/configure.ac
-index f7e6180afd8..5306e5499ec 100644
---- a/libctf/configure.ac
-+++ b/libctf/configure.ac
-@@ -85,6 +85,8 @@ AC_ARG_WITH(extra-soversion-suffix,
- AC_SUBST(EXTRA_SOVERSION_SUFFIX)
- AM_CONDITIONAL([HAVE_EXTRA_SOVERSION_SUFFIX], [test -n "${with_extra_soversion_suffix}"])
-
-+AC_SUBST(BFD_VERSION, $(${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p'), [Version of the accompanying bfd linker])
-+
- # Similar to GDB_AC_CHECK_BFD.
- OLD_CFLAGS=$CFLAGS
- OLD_LDFLAGS=$LDFLAGS
---
-2.31.1
-