gprofng: link libgprofng.so against -lpthread
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Fri, 15 Jul 2022 18:46:22 +0000 (11:46 -0700)
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Mon, 18 Jul 2022 17:42:02 +0000 (10:42 -0700)
gprofng/ChangeLog
2022-07-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

PR gprofng/29364
* src/Makefile.am (libgprofng_la_LIBADD): Add -lpthread.
* src/Makefile.in: Rebuild.

gprofng/src/Makefile.am
gprofng/src/Makefile.in

index 2584a67dc5593f7b28f23891e2b9af5ef0ca7c95..6e0931524e4e82fc87e1a48ab06a7c1a4dba6669 100644 (file)
@@ -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
 
 dbedir = $(SYSCONFDIR)
 dbe_DATA = $(srcdir)/gprofng.rc
index 3d15496147eea540eee5e4d879dec229d84af029..ba7fdd6e8ad2bf258b67982703f4bb3b3e1a7de2 100644 (file)
@@ -160,8 +160,7 @@ am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" \
 LTLIBRARIES = $(pkglib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libgprofng_la_DEPENDENCIES = $(top_builddir)/../opcodes/libopcodes.la \
-       $(top_builddir)/../bfd/libbfd.la $(am__DEPENDENCIES_1) \
-       $(am__DEPENDENCIES_1)
+       $(top_builddir)/../bfd/libbfd.la $(am__DEPENDENCIES_1)
 am__objects_1 = Application.lo BaseMetric.lo BaseMetricTreeNode.lo \
        CallStack.lo CatchOutOfMemory.lo ClassFile.lo Command.lo \
        CompCom.lo DataObject.lo DataSpace.lo Data_window.lo \
@@ -552,10 +551,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
 
 dbedir = $(SYSCONFDIR)
 dbe_DATA = $(srcdir)/gprofng.rc