summaryrefslogtreecommitdiff
blob: 8d7acd1f117f0866a26a107bc9239a7f0559eeed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From 7fbdb5f138dccdd3b65a0bd048802662c6302ea1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
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 <dilfridge@gentoo.org>
---
 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 219367fb9ce..d9365260e8d 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 b881268b0d9..0e8b707f7d7 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 71504e10c51..cb669ed994f 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.41.0