commit:     b359e23310a3269a6b25f49fa0c962364ece0fc5
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  2 11:43:34 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Apr  2 11:43:34 2023 +0000
URL:        
https://gitweb.gentoo.org/proj/toolchain/binutils-patches.git/commit/?id=b359e233

Apply build fix for libiberty to libopcodes and libgprofng

To be upstreamed properly

Bug: https://bugs.gentoo.org/834720
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 ...ilar-libiberty-fix-as-in-7d53105d-for-lib.patch | 84 ++++++++++++++++++++++
 1 file changed, 84 insertions(+)

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
new file mode 100644
index 0000000..d915528
--- /dev/null
+++ b/9999/0007-Apply-a-similar-libiberty-fix-as-in-7d53105d-for-lib.patch
@@ -0,0 +1,84 @@
+From afc5e9fab399c9164f7355b69d0e23318d0559a5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <[email protected]>
+Date: Wed, 22 Feb 2023 20:05:35 +0100
+Subject: [PATCH] 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 <[email protected]>
+---
+ 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 ab90bb08c5f..96256faf788 100644
+--- a/gprofng/src/Makefile.am
++++ b/gprofng/src/Makefile.am
+@@ -131,7 +131,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 605fa4f6fd4..f968d8d6e59 100644
+--- a/gprofng/src/Makefile.in
++++ b/gprofng/src/Makefile.in
+@@ -555,7 +555,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 d2364991ee8..1f483e37fc9 100755
+--- a/opcodes/configure
++++ b/opcodes/configure
+@@ -12445,10 +12445,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 1beb72e87e0..79310916f7d 100644
+--- a/opcodes/configure.ac
++++ b/opcodes/configure.ac
+@@ -193,10 +193,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.39.2
+

Reply via email to