From 1fec9188faca01b3a679ec42cf74c638d4b34ebd Mon Sep 17 00:00:00 2001 From: "Andreas K. Hüttel" Date: Sat, 29 Jun 2024 19:05:16 +0200 Subject: Renumber patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas K. Hüttel --- ...iberty-install-PIC-version-of-libiberty.a.patch | 34 ++++ ...oo-add-with-extra-soversion-suffix-option.patch | 146 +++++++++++++++++ ...iberty-install-PIC-version-of-libiberty.a.patch | 34 ---- ...-also-libctf-optionally-a-gentoo-specific.patch | 175 +++++++++++++++++++++ ...oo-add-with-extra-soversion-suffix-option.patch | 146 ----------------- ...0004-Gentoo-XFAIL-15-broken-ld.gold-tests.patch | 77 +++++++++ ...ilar-libiberty-fix-as-in-7d53105d-for-lib.patch | 84 ++++++++++ ...-also-libctf-optionally-a-gentoo-specific.patch | 175 --------------------- ...0006-Gentoo-XFAIL-15-broken-ld.gold-tests.patch | 77 --------- ...ilar-libiberty-fix-as-in-7d53105d-for-lib.patch | 84 ---------- 10 files changed, 516 insertions(+), 516 deletions(-) create mode 100644 9999/0001-Gentoo-libiberty-install-PIC-version-of-libiberty.a.patch create mode 100644 9999/0002-Gentoo-add-with-extra-soversion-suffix-option.patch delete mode 100644 9999/0002-Gentoo-libiberty-install-PIC-version-of-libiberty.a.patch create mode 100644 9999/0003-Gentoo-Give-also-libctf-optionally-a-gentoo-specific.patch delete mode 100644 9999/0003-Gentoo-add-with-extra-soversion-suffix-option.patch create mode 100644 9999/0004-Gentoo-XFAIL-15-broken-ld.gold-tests.patch create mode 100644 9999/0005-Apply-a-similar-libiberty-fix-as-in-7d53105d-for-lib.patch delete mode 100644 9999/0005-Gentoo-Give-also-libctf-optionally-a-gentoo-specific.patch delete mode 100644 9999/0006-Gentoo-XFAIL-15-broken-ld.gold-tests.patch delete mode 100644 9999/0007-Apply-a-similar-libiberty-fix-as-in-7d53105d-for-lib.patch diff --git a/9999/0001-Gentoo-libiberty-install-PIC-version-of-libiberty.a.patch b/9999/0001-Gentoo-libiberty-install-PIC-version-of-libiberty.a.patch new file mode 100644 index 0000000..a36bb51 --- /dev/null +++ b/9999/0001-Gentoo-libiberty-install-PIC-version-of-libiberty.a.patch @@ -0,0 +1,34 @@ +From 1594a93229b13d3c34c679e5991e64663cace1b9 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 7 Jan 2005 00:15:53 -0500 +Subject: [PATCH 2/7] Gentoo: libiberty: install PIC version of libiberty.a + +This will install a PIC version of libiberty.a by overwriting the non-PIC +version of libiberty.a while compiling. We do this because there is no +shared version of libiberty for random apps to link against which means if +someone wants to use this in a shared library or PIE, they're out of luck. +It's arguable whether people should be able to use this in a shared lib, +but usage in PIE should be fine. You could argue that this penalizes the +non-PIE users, but the counter point is that people using this library in +general are fairly low, and we'd rather have things work for all of them. + +(cherry picked from commit 112aff9ad3e2675556370c4281117a6df0a879d9) +--- + libiberty/Makefile.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in +index b77a41c781c..5e3725d16ff 100644 +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -258,6 +258,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) + $(AR) $(AR_FLAGS) $(TARGETLIB) \ + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ + $(RANLIB) $(TARGETLIB); \ ++ cp $(TARGETLIB) ../ ; \ + cd ..; \ + else true; fi; \ + if [ x"$(NOASANFLAG)" != x ]; then \ +-- +2.44.2 + diff --git a/9999/0002-Gentoo-add-with-extra-soversion-suffix-option.patch b/9999/0002-Gentoo-add-with-extra-soversion-suffix-option.patch new file mode 100644 index 0000000..3694049 --- /dev/null +++ b/9999/0002-Gentoo-add-with-extra-soversion-suffix-option.patch @@ -0,0 +1,146 @@ +From 6d6cbf2ede96fd65bd7a9382c3364aaa9d0ac3bb Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Tue, 20 Jul 2021 21:12:38 +0200 +Subject: [PATCH 3/7] Gentoo: add --with-extra-soversion-suffix= option +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--with-extra-soversion-suffix= will allow Gentoo to +distinct libbfd.so and libopcodes.so to have more precise +SONAME. + +Today --enable-targets=all and --enable-64-bit-bfd change +libbfd.so ABI: +--enable-targets=all adds new symbols to the library +--enable-64-bit-bfd modifies BFD_ARCH_SIZE default and +changes sizes of integer parameters and fields to most +APIs. + +--with-extra-soversion-suffix= will allow Gentoo to inject +additional keys into SONAME to indicate ABI change and avoid +hard to diagnose crashes when user reinstalls libbfd.so +built with different flags (see https://bugs.gentoo.org/663690). + +Bug: https://bugs.gentoo.org/666100 +Signed-off-by: Sergei Trofimovich + +Ported to binutils 2.37 by Andreas K. Hüttel +--- + bfd/Makefile.am | 5 +++++ + bfd/Makefile.in | 4 ++++ + bfd/configure | 13 +++++++++++++ + bfd/configure.ac | 7 +++++++ + 4 files changed, 29 insertions(+) + +diff --git a/bfd/Makefile.am b/bfd/Makefile.am +index 0dc733eaba9..5bd636d931a 100644 +--- a/bfd/Makefile.am ++++ b/bfd/Makefile.am +@@ -64,6 +64,8 @@ bfdinclude_HEADERS += $(INCDIR)/plugin-api.h + LIBDL = @lt_cv_dlopen_libs@ + endif + ++EXTRA_SOVERSION_SUFFIX = @EXTRA_SOVERSION_SUFFIX@ ++ + # bfd.h goes here, for now + BFD_H = bfd.h + +@@ -999,6 +1001,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 ;\ ++ if test x"$(EXTRA_SOVERSION_SUFFIX)" != x ; then \ ++ bfd_soversion="$${bfd_soversion}.$(EXTRA_SOVERSION_SUFFIX)" ;\ ++ fi ;\ + $(SED) -e "s,@bfd_version@,$$bfd_version," \ + -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 b3d97d478ea..38209d1b234 100644 +--- a/bfd/Makefile.in ++++ b/bfd/Makefile.in +@@ -348,6 +348,7 @@ ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ ++EXTRA_SOVERSION_SUFFIX = @EXTRA_SOVERSION_SUFFIX@ + FGREP = @FGREP@ + GENCAT = @GENCAT@ + GMSGFMT = @GMSGFMT@ +@@ -2471,6 +2472,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 ;\ ++ if test x"$(EXTRA_SOVERSION_SUFFIX)" != x ; then \ ++ bfd_soversion="$${bfd_soversion}.$(EXTRA_SOVERSION_SUFFIX)" ;\ ++ fi ;\ + $(SED) -e "s,@bfd_version@,$$bfd_version," \ + -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 6458974951e..b43789851cd 100755 +--- a/bfd/configure ++++ b/bfd/configure +@@ -701,6 +701,7 @@ WARN_CFLAGS + REPORT_BUGS_TEXI + REPORT_BUGS_TO + PKGVERSION ++EXTRA_SOVERSION_SUFFIX + DEBUGDIR + ENABLE_BFD_64_BIT_FALSE + ENABLE_BFD_64_BIT_TRUE +@@ -842,6 +843,7 @@ enable_secureplt + enable_separate_code + enable_leading_mingw64_underscores + with_separate_debug_dir ++with_extra_soversion_suffix + with_pkgversion + with_bugurl + enable_werror +@@ -1530,6 +1532,8 @@ Optional Packages: + --with-separate-debug-dir=DIR + Look for global separate debug info in DIR + [[default=LIBDIR/debug]] ++ --with-extra-soversion-suffix=SUFFIX ++ Append '.SUFFIX' to SONAME [default=] + --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 +@@ -12082,6 +12086,15 @@ fi + + + ++EXTRA_SOVERSION_SUFFIX= ++ ++# Check whether --with-extra-soversion-suffix was given. ++if test "${with_extra_soversion_suffix+set}" = set; then : ++ withval=$with_extra_soversion_suffix; EXTRA_SOVERSION_SUFFIX="${withval}" ++fi ++ ++ ++ + + + # Check whether --with-pkgversion was given. +diff --git a/bfd/configure.ac b/bfd/configure.ac +index 6bcfd1b7368..dde0a3af03e 100644 +--- a/bfd/configure.ac ++++ b/bfd/configure.ac +@@ -167,6 +167,13 @@ AC_ARG_WITH(separate-debug-dir, + [DEBUGDIR="${withval}"]) + AC_SUBST(DEBUGDIR) + ++EXTRA_SOVERSION_SUFFIX= ++AC_ARG_WITH(extra-soversion-suffix, ++ AS_HELP_STRING([--with-extra-soversion-suffix=SUFFIX], ++ [Append '.SUFFIX' to SONAME [[default=]]]), ++[EXTRA_SOVERSION_SUFFIX="${withval}"]) ++AC_SUBST(EXTRA_SOVERSION_SUFFIX) ++ + ACX_PKGVERSION([GNU Binutils]) + ACX_BUGURL([https://sourceware.org/bugzilla/]) + +-- +2.44.2 + 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 deleted file mode 100644 index a36bb51..0000000 --- a/9999/0002-Gentoo-libiberty-install-PIC-version-of-libiberty.a.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 1594a93229b13d3c34c679e5991e64663cace1b9 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -Date: Fri, 7 Jan 2005 00:15:53 -0500 -Subject: [PATCH 2/7] Gentoo: libiberty: install PIC version of libiberty.a - -This will install a PIC version of libiberty.a by overwriting the non-PIC -version of libiberty.a while compiling. We do this because there is no -shared version of libiberty for random apps to link against which means if -someone wants to use this in a shared library or PIE, they're out of luck. -It's arguable whether people should be able to use this in a shared lib, -but usage in PIE should be fine. You could argue that this penalizes the -non-PIE users, but the counter point is that people using this library in -general are fairly low, and we'd rather have things work for all of them. - -(cherry picked from commit 112aff9ad3e2675556370c4281117a6df0a879d9) ---- - libiberty/Makefile.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in -index b77a41c781c..5e3725d16ff 100644 ---- a/libiberty/Makefile.in -+++ b/libiberty/Makefile.in -@@ -258,6 +258,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) - $(AR) $(AR_FLAGS) $(TARGETLIB) \ - $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ - $(RANLIB) $(TARGETLIB); \ -+ cp $(TARGETLIB) ../ ; \ - cd ..; \ - else true; fi; \ - if [ x"$(NOASANFLAG)" != x ]; then \ --- -2.44.2 - diff --git a/9999/0003-Gentoo-Give-also-libctf-optionally-a-gentoo-specific.patch b/9999/0003-Gentoo-Give-also-libctf-optionally-a-gentoo-specific.patch new file mode 100644 index 0000000..6964aab --- /dev/null +++ b/9999/0003-Gentoo-Give-also-libctf-optionally-a-gentoo-specific.patch @@ -0,0 +1,175 @@ +From a8cf14f5ea0a210928250fd1c47b4e45c39974c5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= +Date: Sat, 24 Jul 2021 15:20:16 +0200 +Subject: [PATCH 5/7] Gentoo: Give also libctf optionally a gentoo-specific + soversion + +--- + libctf/Makefile.am | 14 +++++++++++++- + libctf/Makefile.in | 9 ++++++++- + libctf/configure | 31 +++++++++++++++++++++++++++++++ + libctf/configure.ac | 10 ++++++++++ + 4 files changed, 62 insertions(+), 2 deletions(-) + +diff --git a/libctf/Makefile.am b/libctf/Makefile.am +index fb1a306c888..5fcc73bd04e 100644 +--- a/libctf/Makefile.am ++++ b/libctf/Makefile.am +@@ -31,6 +31,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. +@@ -51,8 +54,17 @@ include_HEADERS = + noinst_LTLIBRARIES = libctf.la libctf-nobfd.la + endif + ++# 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. ++ ++if HAVE_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_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 \ +diff --git a/libctf/Makefile.in b/libctf/Makefile.in +index 54f5daa79ee..b7a80edfab6 100644 +--- a/libctf/Makefile.in ++++ b/libctf/Makefile.in +@@ -430,6 +430,7 @@ AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ ++BFD_VERSION = @BFD_VERSION@ + CATALOGS = @CATALOGS@ + CATOBJEXT = @CATOBJEXT@ + CC = @CC@ +@@ -452,6 +453,7 @@ EXEEXT = @EXEEXT@ + + # Setup the testing framework, if you have one + EXPECT = expect ++EXTRA_SOVERSION_SUFFIX = @EXTRA_SOVERSION_SUFFIX@ + FGREP = @FGREP@ + GENCAT = @GENCAT@ + GMSGFMT = @GMSGFMT@ +@@ -603,8 +605,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 ++@HAVE_EXTRA_SOVERSION_SUFFIX_FALSE@gentoo_ctf_soversion = 0.0.0 ++ ++# 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 = "$(BFD_VERSION).$(EXTRA_SOVERSION_SUFFIX)" + libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB) +-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 \ +diff --git a/libctf/configure b/libctf/configure +index 7466d56a18b..54c86592b70 100755 +--- a/libctf/configure ++++ b/libctf/configure +@@ -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 +@@ -821,6 +825,7 @@ enable_maintainer_mode + enable_install_libbfd + with_system_zlib + enable_libctf_hash_debugging ++with_extra_soversion_suffix + ' + ac_precious_vars='build_alias + host_alias +@@ -1487,6 +1492,8 @@ Optional Packages: + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-system-zlib use installed libz ++ --with-extra-soversion-suffix=SUFFIX ++ Append '.SUFFIX' to SONAME [[default=]] + + Some influential environment variables: + CC C compiler command +@@ -16274,6 +16281,26 @@ else + fi + + ++EXTRA_SOVERSION_SUFFIX= ++ ++# Check whether --with-extra-soversion-suffix was given. ++if test "${with_extra_soversion_suffix+set}" = set; then : ++ withval=$with_extra_soversion_suffix; EXTRA_SOVERSION_SUFFIX="${withval}" ++fi ++ ++ ++ if test -n "${with_extra_soversion_suffix}"; then ++ HAVE_EXTRA_SOVERSION_SUFFIX_TRUE= ++ HAVE_EXTRA_SOVERSION_SUFFIX_FALSE='#' ++else ++ HAVE_EXTRA_SOVERSION_SUFFIX_TRUE='#' ++ HAVE_EXTRA_SOVERSION_SUFFIX_FALSE= ++fi ++ ++ ++BFD_VERSION=$(${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p') ++ ++ + # Similar to GDB_AC_CHECK_BFD. + OLD_CFLAGS=$CFLAGS + OLD_LDFLAGS=$LDFLAGS +@@ -17177,6 +17204,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 ++if test -z "${HAVE_EXTRA_SOVERSION_SUFFIX_TRUE}" && test -z "${HAVE_EXTRA_SOVERSION_SUFFIX_FALSE}"; then ++ as_fn_error $? "conditional \"HAVE_EXTRA_SOVERSION_SUFFIX\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + 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 64544b83a9f..1ce43327c25 100644 +--- a/libctf/configure.ac ++++ b/libctf/configure.ac +@@ -76,6 +76,16 @@ if test "${enable_libctf_hash_debugging}" = yes; then + fi + AM_CONDITIONAL(ENABLE_LIBCTF_HASH_DEBUGGING, test "${enable_libctf_hash_debugging}" = yes) + ++EXTRA_SOVERSION_SUFFIX= ++AC_ARG_WITH(extra-soversion-suffix, ++ AS_HELP_STRING([--with-extra-soversion-suffix=SUFFIX], ++ [Append '.SUFFIX' to SONAME [[default=]]]), ++[EXTRA_SOVERSION_SUFFIX="${withval}"]) ++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.44.2 + diff --git a/9999/0003-Gentoo-add-with-extra-soversion-suffix-option.patch b/9999/0003-Gentoo-add-with-extra-soversion-suffix-option.patch deleted file mode 100644 index 3694049..0000000 --- a/9999/0003-Gentoo-add-with-extra-soversion-suffix-option.patch +++ /dev/null @@ -1,146 +0,0 @@ -From 6d6cbf2ede96fd65bd7a9382c3364aaa9d0ac3bb Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Tue, 20 Jul 2021 21:12:38 +0200 -Subject: [PATCH 3/7] Gentoo: add --with-extra-soversion-suffix= option -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - ---with-extra-soversion-suffix= will allow Gentoo to -distinct libbfd.so and libopcodes.so to have more precise -SONAME. - -Today --enable-targets=all and --enable-64-bit-bfd change -libbfd.so ABI: ---enable-targets=all adds new symbols to the library ---enable-64-bit-bfd modifies BFD_ARCH_SIZE default and -changes sizes of integer parameters and fields to most -APIs. - ---with-extra-soversion-suffix= will allow Gentoo to inject -additional keys into SONAME to indicate ABI change and avoid -hard to diagnose crashes when user reinstalls libbfd.so -built with different flags (see https://bugs.gentoo.org/663690). - -Bug: https://bugs.gentoo.org/666100 -Signed-off-by: Sergei Trofimovich - -Ported to binutils 2.37 by Andreas K. Hüttel ---- - bfd/Makefile.am | 5 +++++ - bfd/Makefile.in | 4 ++++ - bfd/configure | 13 +++++++++++++ - bfd/configure.ac | 7 +++++++ - 4 files changed, 29 insertions(+) - -diff --git a/bfd/Makefile.am b/bfd/Makefile.am -index 0dc733eaba9..5bd636d931a 100644 ---- a/bfd/Makefile.am -+++ b/bfd/Makefile.am -@@ -64,6 +64,8 @@ bfdinclude_HEADERS += $(INCDIR)/plugin-api.h - LIBDL = @lt_cv_dlopen_libs@ - endif - -+EXTRA_SOVERSION_SUFFIX = @EXTRA_SOVERSION_SUFFIX@ -+ - # bfd.h goes here, for now - BFD_H = bfd.h - -@@ -999,6 +1001,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 ;\ -+ if test x"$(EXTRA_SOVERSION_SUFFIX)" != x ; then \ -+ bfd_soversion="$${bfd_soversion}.$(EXTRA_SOVERSION_SUFFIX)" ;\ -+ fi ;\ - $(SED) -e "s,@bfd_version@,$$bfd_version," \ - -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 b3d97d478ea..38209d1b234 100644 ---- a/bfd/Makefile.in -+++ b/bfd/Makefile.in -@@ -348,6 +348,7 @@ ECHO_T = @ECHO_T@ - EGREP = @EGREP@ - EXEEXT = @EXEEXT@ - EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -+EXTRA_SOVERSION_SUFFIX = @EXTRA_SOVERSION_SUFFIX@ - FGREP = @FGREP@ - GENCAT = @GENCAT@ - GMSGFMT = @GMSGFMT@ -@@ -2471,6 +2472,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 ;\ -+ if test x"$(EXTRA_SOVERSION_SUFFIX)" != x ; then \ -+ bfd_soversion="$${bfd_soversion}.$(EXTRA_SOVERSION_SUFFIX)" ;\ -+ fi ;\ - $(SED) -e "s,@bfd_version@,$$bfd_version," \ - -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 6458974951e..b43789851cd 100755 ---- a/bfd/configure -+++ b/bfd/configure -@@ -701,6 +701,7 @@ WARN_CFLAGS - REPORT_BUGS_TEXI - REPORT_BUGS_TO - PKGVERSION -+EXTRA_SOVERSION_SUFFIX - DEBUGDIR - ENABLE_BFD_64_BIT_FALSE - ENABLE_BFD_64_BIT_TRUE -@@ -842,6 +843,7 @@ enable_secureplt - enable_separate_code - enable_leading_mingw64_underscores - with_separate_debug_dir -+with_extra_soversion_suffix - with_pkgversion - with_bugurl - enable_werror -@@ -1530,6 +1532,8 @@ Optional Packages: - --with-separate-debug-dir=DIR - Look for global separate debug info in DIR - [[default=LIBDIR/debug]] -+ --with-extra-soversion-suffix=SUFFIX -+ Append '.SUFFIX' to SONAME [default=] - --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 -@@ -12082,6 +12086,15 @@ fi - - - -+EXTRA_SOVERSION_SUFFIX= -+ -+# Check whether --with-extra-soversion-suffix was given. -+if test "${with_extra_soversion_suffix+set}" = set; then : -+ withval=$with_extra_soversion_suffix; EXTRA_SOVERSION_SUFFIX="${withval}" -+fi -+ -+ -+ - - - # Check whether --with-pkgversion was given. -diff --git a/bfd/configure.ac b/bfd/configure.ac -index 6bcfd1b7368..dde0a3af03e 100644 ---- a/bfd/configure.ac -+++ b/bfd/configure.ac -@@ -167,6 +167,13 @@ AC_ARG_WITH(separate-debug-dir, - [DEBUGDIR="${withval}"]) - AC_SUBST(DEBUGDIR) - -+EXTRA_SOVERSION_SUFFIX= -+AC_ARG_WITH(extra-soversion-suffix, -+ AS_HELP_STRING([--with-extra-soversion-suffix=SUFFIX], -+ [Append '.SUFFIX' to SONAME [[default=]]]), -+[EXTRA_SOVERSION_SUFFIX="${withval}"]) -+AC_SUBST(EXTRA_SOVERSION_SUFFIX) -+ - ACX_PKGVERSION([GNU Binutils]) - ACX_BUGURL([https://sourceware.org/bugzilla/]) - --- -2.44.2 - diff --git a/9999/0004-Gentoo-XFAIL-15-broken-ld.gold-tests.patch b/9999/0004-Gentoo-XFAIL-15-broken-ld.gold-tests.patch new file mode 100644 index 0000000..fe6da95 --- /dev/null +++ b/9999/0004-Gentoo-XFAIL-15-broken-ld.gold-tests.patch @@ -0,0 +1,77 @@ +From d826b80fe902aefd77465be3650ab2d62af5e099 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= +Date: Sat, 31 Jul 2021 01:18:18 +0200 +Subject: [PATCH 6/7] 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 +these test failures for the moment. For details see the linked bugs. + +Bug: https://bugs.gentoo.org/684046 +Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22755 +Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27303 +--- + gold/testsuite/Makefile.am | 6 ++++++ + gold/testsuite/Makefile.in | 16 ++++++++++++---- + 2 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am +index 2f1348fd6e2..1206460f191 100644 +--- a/gold/testsuite/Makefile.am ++++ b/gold/testsuite/Makefile.am +@@ -1,5 +1,11 @@ + # Process this file with automake to generate Makefile.in + ++# Gentoo, https://bugs.gentoo.org/684046 ++XFAIL_TESTS = exception_separate_shared_12_test exception_separate_shared_21_test \ ++ weak_undef_test initpri3a justsyms_exec script_test_2 script_test_1 \ ++ justsyms binary_test script_test_3 tls_phdrs_script_test script_test_12i \ ++ dynamic_list_2 incremental_test_2 incremental_test_5 ++ + # As far as I can tell automake testing support assumes that the build + # system and the host system are the same. So these tests will not + # work when building with a cross-compiler. +diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in +index 9cf21df8d7d..df14333c558 100644 +--- a/gold/testsuite/Makefile.in ++++ b/gold/testsuite/Makefile.in +@@ -15,10 +15,6 @@ + @SET_MAKE@ + + # Process this file with automake to generate Makefile.in +- +-# As far as I can tell automake testing support assumes that the build +-# system and the host system are the same. So these tests will not +-# work when building with a cross-compiler. + VPATH = @srcdir@ + am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ +@@ -94,6 +90,14 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ ++XFAIL_TESTS = exception_separate_shared_12_test$(EXEEXT) \ ++ exception_separate_shared_21_test$(EXEEXT) \ ++ weak_undef_test$(EXEEXT) initpri3a$(EXEEXT) \ ++ justsyms_exec$(EXEEXT) script_test_2$(EXEEXT) \ ++ script_test_1$(EXEEXT) justsyms$(EXEEXT) binary_test$(EXEEXT) \ ++ script_test_3$(EXEEXT) tls_phdrs_script_test$(EXEEXT) \ ++ script_test_12i$(EXEEXT) dynamic_list_2$(EXEEXT) \ ++ incremental_test_2$(EXEEXT) incremental_test_5$(EXEEXT) + check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ + $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \ + $(am__EXEEXT_7) $(am__EXEEXT_8) $(am__EXEEXT_9) \ +@@ -2782,6 +2786,10 @@ top_srcdir = @top_srcdir@ + zlibdir = @zlibdir@ + zlibinc = @zlibinc@ + ++# As far as I can tell automake testing support assumes that the build ++# system and the host system are the same. So these tests will not ++# work when building with a cross-compiler. ++ + # Ignore warning about AM_PROG_CC_C_O due to large_CFLAGS + AUTOMAKE_OPTIONS = foreign -Wno-portability + +-- +2.44.2 + diff --git a/9999/0005-Apply-a-similar-libiberty-fix-as-in-7d53105d-for-lib.patch b/9999/0005-Apply-a-similar-libiberty-fix-as-in-7d53105d-for-lib.patch new file mode 100644 index 0000000..6eebb98 --- /dev/null +++ b/9999/0005-Apply-a-similar-libiberty-fix-as-in-7d53105d-for-lib.patch @@ -0,0 +1,84 @@ +From bbaa9fafb08385e5ad836bc30a2db3af47d1cc5a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= +Date: Wed, 22 Feb 2023 20:05:35 +0100 +Subject: [PATCH 7/7] Apply a similar libiberty fix as in 7d53105d for + libopcodes and libgprofng +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29042 +Bug: https://bugs.gentoo.org/834720 +Signed-off-by: Andreas K. Hüttel +--- + gprofng/src/Makefile.am | 3 ++- + gprofng/src/Makefile.in | 3 ++- + opcodes/configure | 4 ++-- + opcodes/configure.ac | 4 ++-- + 4 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/gprofng/src/Makefile.am b/gprofng/src/Makefile.am +index fb4b8a0fafa..3d7cb18ff71 100644 +--- a/gprofng/src/Makefile.am ++++ b/gprofng/src/Makefile.am +@@ -144,7 +144,8 @@ libgprofng_la_LDFLAGS = -version-info 0:0:0 + # Pass -lpthread instead of $(PTHREAD_LIBS) due to $(PTHREAD_LIBS) being empty + # when -nostdlib is passed to libtool. + # See bug 29364 - libgprofng.so: needs to link against -pthread +-libgprofng_la_LIBADD = $(top_builddir)/../opcodes/libopcodes.la \ ++libgprofng_la_LIBADD = $(GPROFNG_LIBADD) \ ++ $(top_builddir)/../opcodes/libopcodes.la \ + $(top_builddir)/../bfd/libbfd.la \ + $(GPROFNG_LIBADD) \ + -lpthread -ldl +diff --git a/gprofng/src/Makefile.in b/gprofng/src/Makefile.in +index cef4b275305..295fd3ee2df 100644 +--- a/gprofng/src/Makefile.in ++++ b/gprofng/src/Makefile.in +@@ -552,7 +552,8 @@ libgprofng_la_LDFLAGS = -version-info 0:0:0 + # Pass -lpthread instead of $(PTHREAD_LIBS) due to $(PTHREAD_LIBS) being empty + # when -nostdlib is passed to libtool. + # See bug 29364 - libgprofng.so: needs to link against -pthread +-libgprofng_la_LIBADD = $(top_builddir)/../opcodes/libopcodes.la \ ++libgprofng_la_LIBADD = $(GPROFNG_LIBADD) \ ++ $(top_builddir)/../opcodes/libopcodes.la \ + $(top_builddir)/../bfd/libbfd.la \ + $(GPROFNG_LIBADD) \ + -lpthread -ldl +diff --git a/opcodes/configure b/opcodes/configure +index 050fd5ff0ff..4b68211dea6 100755 +--- a/opcodes/configure ++++ b/opcodes/configure +@@ -14379,10 +14379,10 @@ if test "$enable_shared" = "yes"; then + case "${host}" in + *-*-cygwin*) + SHARED_LDFLAGS="-no-undefined" +- SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" ++ SHARED_LIBADD="$SHARED_LIBADD -L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" + ;; + *) +- SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}" ++ SHARED_LIBADD="${SHARED_LIBADD} ../bfd/libbfd.la ${SHARED_LIBADD}" + SHARED_DEPENDENCIES="../bfd/libbfd.la" + ;; + esac +diff --git a/opcodes/configure.ac b/opcodes/configure.ac +index 4d918e3ef9b..9692e69693e 100644 +--- a/opcodes/configure.ac ++++ b/opcodes/configure.ac +@@ -195,10 +195,10 @@ if test "$enable_shared" = "yes"; then + case "${host}" in + *-*-cygwin*) + SHARED_LDFLAGS="-no-undefined" +- SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" ++ SHARED_LIBADD="$SHARED_LIBADD -L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" + ;; + *) +- SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}" ++ SHARED_LIBADD="${SHARED_LIBADD} ../bfd/libbfd.la ${SHARED_LIBADD}" + SHARED_DEPENDENCIES="../bfd/libbfd.la" + ;; + esac +-- +2.44.2 + diff --git a/9999/0005-Gentoo-Give-also-libctf-optionally-a-gentoo-specific.patch b/9999/0005-Gentoo-Give-also-libctf-optionally-a-gentoo-specific.patch deleted file mode 100644 index 6964aab..0000000 --- a/9999/0005-Gentoo-Give-also-libctf-optionally-a-gentoo-specific.patch +++ /dev/null @@ -1,175 +0,0 @@ -From a8cf14f5ea0a210928250fd1c47b4e45c39974c5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= -Date: Sat, 24 Jul 2021 15:20:16 +0200 -Subject: [PATCH 5/7] Gentoo: Give also libctf optionally a gentoo-specific - soversion - ---- - libctf/Makefile.am | 14 +++++++++++++- - libctf/Makefile.in | 9 ++++++++- - libctf/configure | 31 +++++++++++++++++++++++++++++++ - libctf/configure.ac | 10 ++++++++++ - 4 files changed, 62 insertions(+), 2 deletions(-) - -diff --git a/libctf/Makefile.am b/libctf/Makefile.am -index fb1a306c888..5fcc73bd04e 100644 ---- a/libctf/Makefile.am -+++ b/libctf/Makefile.am -@@ -31,6 +31,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. -@@ -51,8 +54,17 @@ include_HEADERS = - noinst_LTLIBRARIES = libctf.la libctf-nobfd.la - endif - -+# 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. -+ -+if HAVE_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_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 \ -diff --git a/libctf/Makefile.in b/libctf/Makefile.in -index 54f5daa79ee..b7a80edfab6 100644 ---- a/libctf/Makefile.in -+++ b/libctf/Makefile.in -@@ -430,6 +430,7 @@ AUTOCONF = @AUTOCONF@ - AUTOHEADER = @AUTOHEADER@ - AUTOMAKE = @AUTOMAKE@ - AWK = @AWK@ -+BFD_VERSION = @BFD_VERSION@ - CATALOGS = @CATALOGS@ - CATOBJEXT = @CATOBJEXT@ - CC = @CC@ -@@ -452,6 +453,7 @@ EXEEXT = @EXEEXT@ - - # Setup the testing framework, if you have one - EXPECT = expect -+EXTRA_SOVERSION_SUFFIX = @EXTRA_SOVERSION_SUFFIX@ - FGREP = @FGREP@ - GENCAT = @GENCAT@ - GMSGFMT = @GMSGFMT@ -@@ -603,8 +605,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 -+@HAVE_EXTRA_SOVERSION_SUFFIX_FALSE@gentoo_ctf_soversion = 0.0.0 -+ -+# 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 = "$(BFD_VERSION).$(EXTRA_SOVERSION_SUFFIX)" - libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB) --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 \ -diff --git a/libctf/configure b/libctf/configure -index 7466d56a18b..54c86592b70 100755 ---- a/libctf/configure -+++ b/libctf/configure -@@ -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 -@@ -821,6 +825,7 @@ enable_maintainer_mode - enable_install_libbfd - with_system_zlib - enable_libctf_hash_debugging -+with_extra_soversion_suffix - ' - ac_precious_vars='build_alias - host_alias -@@ -1487,6 +1492,8 @@ Optional Packages: - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-system-zlib use installed libz -+ --with-extra-soversion-suffix=SUFFIX -+ Append '.SUFFIX' to SONAME [[default=]] - - Some influential environment variables: - CC C compiler command -@@ -16274,6 +16281,26 @@ else - fi - - -+EXTRA_SOVERSION_SUFFIX= -+ -+# Check whether --with-extra-soversion-suffix was given. -+if test "${with_extra_soversion_suffix+set}" = set; then : -+ withval=$with_extra_soversion_suffix; EXTRA_SOVERSION_SUFFIX="${withval}" -+fi -+ -+ -+ if test -n "${with_extra_soversion_suffix}"; then -+ HAVE_EXTRA_SOVERSION_SUFFIX_TRUE= -+ HAVE_EXTRA_SOVERSION_SUFFIX_FALSE='#' -+else -+ HAVE_EXTRA_SOVERSION_SUFFIX_TRUE='#' -+ HAVE_EXTRA_SOVERSION_SUFFIX_FALSE= -+fi -+ -+ -+BFD_VERSION=$(${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p') -+ -+ - # Similar to GDB_AC_CHECK_BFD. - OLD_CFLAGS=$CFLAGS - OLD_LDFLAGS=$LDFLAGS -@@ -17177,6 +17204,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 -+if test -z "${HAVE_EXTRA_SOVERSION_SUFFIX_TRUE}" && test -z "${HAVE_EXTRA_SOVERSION_SUFFIX_FALSE}"; then -+ as_fn_error $? "conditional \"HAVE_EXTRA_SOVERSION_SUFFIX\" was never defined. -+Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+fi - - 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 64544b83a9f..1ce43327c25 100644 ---- a/libctf/configure.ac -+++ b/libctf/configure.ac -@@ -76,6 +76,16 @@ if test "${enable_libctf_hash_debugging}" = yes; then - fi - AM_CONDITIONAL(ENABLE_LIBCTF_HASH_DEBUGGING, test "${enable_libctf_hash_debugging}" = yes) - -+EXTRA_SOVERSION_SUFFIX= -+AC_ARG_WITH(extra-soversion-suffix, -+ AS_HELP_STRING([--with-extra-soversion-suffix=SUFFIX], -+ [Append '.SUFFIX' to SONAME [[default=]]]), -+[EXTRA_SOVERSION_SUFFIX="${withval}"]) -+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.44.2 - diff --git a/9999/0006-Gentoo-XFAIL-15-broken-ld.gold-tests.patch b/9999/0006-Gentoo-XFAIL-15-broken-ld.gold-tests.patch deleted file mode 100644 index fe6da95..0000000 --- a/9999/0006-Gentoo-XFAIL-15-broken-ld.gold-tests.patch +++ /dev/null @@ -1,77 +0,0 @@ -From d826b80fe902aefd77465be3650ab2d62af5e099 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= -Date: Sat, 31 Jul 2021 01:18:18 +0200 -Subject: [PATCH 6/7] 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 -these test failures for the moment. For details see the linked bugs. - -Bug: https://bugs.gentoo.org/684046 -Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22755 -Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27303 ---- - gold/testsuite/Makefile.am | 6 ++++++ - gold/testsuite/Makefile.in | 16 ++++++++++++---- - 2 files changed, 18 insertions(+), 4 deletions(-) - -diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am -index 2f1348fd6e2..1206460f191 100644 ---- a/gold/testsuite/Makefile.am -+++ b/gold/testsuite/Makefile.am -@@ -1,5 +1,11 @@ - # Process this file with automake to generate Makefile.in - -+# Gentoo, https://bugs.gentoo.org/684046 -+XFAIL_TESTS = exception_separate_shared_12_test exception_separate_shared_21_test \ -+ weak_undef_test initpri3a justsyms_exec script_test_2 script_test_1 \ -+ justsyms binary_test script_test_3 tls_phdrs_script_test script_test_12i \ -+ dynamic_list_2 incremental_test_2 incremental_test_5 -+ - # As far as I can tell automake testing support assumes that the build - # system and the host system are the same. So these tests will not - # work when building with a cross-compiler. -diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in -index 9cf21df8d7d..df14333c558 100644 ---- a/gold/testsuite/Makefile.in -+++ b/gold/testsuite/Makefile.in -@@ -15,10 +15,6 @@ - @SET_MAKE@ - - # Process this file with automake to generate Makefile.in -- --# As far as I can tell automake testing support assumes that the build --# system and the host system are the same. So these tests will not --# work when building with a cross-compiler. - VPATH = @srcdir@ - am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ -@@ -94,6 +90,14 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - target_triplet = @target@ -+XFAIL_TESTS = exception_separate_shared_12_test$(EXEEXT) \ -+ exception_separate_shared_21_test$(EXEEXT) \ -+ weak_undef_test$(EXEEXT) initpri3a$(EXEEXT) \ -+ justsyms_exec$(EXEEXT) script_test_2$(EXEEXT) \ -+ script_test_1$(EXEEXT) justsyms$(EXEEXT) binary_test$(EXEEXT) \ -+ script_test_3$(EXEEXT) tls_phdrs_script_test$(EXEEXT) \ -+ script_test_12i$(EXEEXT) dynamic_list_2$(EXEEXT) \ -+ incremental_test_2$(EXEEXT) incremental_test_5$(EXEEXT) - check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ - $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \ - $(am__EXEEXT_7) $(am__EXEEXT_8) $(am__EXEEXT_9) \ -@@ -2782,6 +2786,10 @@ top_srcdir = @top_srcdir@ - zlibdir = @zlibdir@ - zlibinc = @zlibinc@ - -+# As far as I can tell automake testing support assumes that the build -+# system and the host system are the same. So these tests will not -+# work when building with a cross-compiler. -+ - # Ignore warning about AM_PROG_CC_C_O due to large_CFLAGS - AUTOMAKE_OPTIONS = foreign -Wno-portability - --- -2.44.2 - diff --git a/9999/0007-Apply-a-similar-libiberty-fix-as-in-7d53105d-for-lib.patch b/9999/0007-Apply-a-similar-libiberty-fix-as-in-7d53105d-for-lib.patch deleted file mode 100644 index 6eebb98..0000000 --- a/9999/0007-Apply-a-similar-libiberty-fix-as-in-7d53105d-for-lib.patch +++ /dev/null @@ -1,84 +0,0 @@ -From bbaa9fafb08385e5ad836bc30a2db3af47d1cc5a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= -Date: Wed, 22 Feb 2023 20:05:35 +0100 -Subject: [PATCH 7/7] Apply a similar libiberty fix as in 7d53105d for - libopcodes and libgprofng -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29042 -Bug: https://bugs.gentoo.org/834720 -Signed-off-by: Andreas K. Hüttel ---- - gprofng/src/Makefile.am | 3 ++- - gprofng/src/Makefile.in | 3 ++- - opcodes/configure | 4 ++-- - opcodes/configure.ac | 4 ++-- - 4 files changed, 8 insertions(+), 6 deletions(-) - -diff --git a/gprofng/src/Makefile.am b/gprofng/src/Makefile.am -index fb4b8a0fafa..3d7cb18ff71 100644 ---- a/gprofng/src/Makefile.am -+++ b/gprofng/src/Makefile.am -@@ -144,7 +144,8 @@ libgprofng_la_LDFLAGS = -version-info 0:0:0 - # Pass -lpthread instead of $(PTHREAD_LIBS) due to $(PTHREAD_LIBS) being empty - # when -nostdlib is passed to libtool. - # See bug 29364 - libgprofng.so: needs to link against -pthread --libgprofng_la_LIBADD = $(top_builddir)/../opcodes/libopcodes.la \ -+libgprofng_la_LIBADD = $(GPROFNG_LIBADD) \ -+ $(top_builddir)/../opcodes/libopcodes.la \ - $(top_builddir)/../bfd/libbfd.la \ - $(GPROFNG_LIBADD) \ - -lpthread -ldl -diff --git a/gprofng/src/Makefile.in b/gprofng/src/Makefile.in -index cef4b275305..295fd3ee2df 100644 ---- a/gprofng/src/Makefile.in -+++ b/gprofng/src/Makefile.in -@@ -552,7 +552,8 @@ libgprofng_la_LDFLAGS = -version-info 0:0:0 - # Pass -lpthread instead of $(PTHREAD_LIBS) due to $(PTHREAD_LIBS) being empty - # when -nostdlib is passed to libtool. - # See bug 29364 - libgprofng.so: needs to link against -pthread --libgprofng_la_LIBADD = $(top_builddir)/../opcodes/libopcodes.la \ -+libgprofng_la_LIBADD = $(GPROFNG_LIBADD) \ -+ $(top_builddir)/../opcodes/libopcodes.la \ - $(top_builddir)/../bfd/libbfd.la \ - $(GPROFNG_LIBADD) \ - -lpthread -ldl -diff --git a/opcodes/configure b/opcodes/configure -index 050fd5ff0ff..4b68211dea6 100755 ---- a/opcodes/configure -+++ b/opcodes/configure -@@ -14379,10 +14379,10 @@ if test "$enable_shared" = "yes"; then - case "${host}" in - *-*-cygwin*) - SHARED_LDFLAGS="-no-undefined" -- SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" -+ SHARED_LIBADD="$SHARED_LIBADD -L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" - ;; - *) -- SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}" -+ SHARED_LIBADD="${SHARED_LIBADD} ../bfd/libbfd.la ${SHARED_LIBADD}" - SHARED_DEPENDENCIES="../bfd/libbfd.la" - ;; - esac -diff --git a/opcodes/configure.ac b/opcodes/configure.ac -index 4d918e3ef9b..9692e69693e 100644 ---- a/opcodes/configure.ac -+++ b/opcodes/configure.ac -@@ -195,10 +195,10 @@ if test "$enable_shared" = "yes"; then - case "${host}" in - *-*-cygwin*) - SHARED_LDFLAGS="-no-undefined" -- SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" -+ SHARED_LIBADD="$SHARED_LIBADD -L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" - ;; - *) -- SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}" -+ SHARED_LIBADD="${SHARED_LIBADD} ../bfd/libbfd.la ${SHARED_LIBADD}" - SHARED_DEPENDENCIES="../bfd/libbfd.la" - ;; - esac --- -2.44.2 - -- cgit v1.2.3-65-gdbad