bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gprofng/29364] libgprofng.so: needs to link against -pthread


From: vladimir.mezentsev at oracle dot com
Subject: [Bug gprofng/29364] libgprofng.so: needs to link against -pthread
Date: Fri, 15 Jul 2022 18:52:51 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29364

Vladimir Mezentsev <vladimir.mezentsev at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #2 from Vladimir Mezentsev <vladimir.mezentsev at oracle dot com> 
---
$(PTHREAD_LIBS) is empty when -nostdlib is passed to libtool.

I propose the following fix:

diff --git a/gprofng/src/Makefile.am b/gprofng/src/Makefile.am
index 2584a67dc55..6e0931524e4 100644
--- a/gprofng/src/Makefile.am
+++ b/gprofng/src/Makefile.am
@@ -127,10 +127,14 @@ EXTRA_DIST = QLParser.yy $(man_MANS)
 pkglib_LTLIBRARIES = $(LIBGPROFNG)
 libgprofng_la_SOURCES = $(CCSOURCES) $(CSOURCES)
 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 \
        $(top_builddir)/../bfd/libbfd.la \
        $(GPROFNG_LIBADD) \
-       $(PTHREAD_LIBS) -ldl
+       -lpthread -ldl

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]