systemtap/link-with-pthread.patch

36 lines
1.8 KiB
Diff

Otherwise we get this link error:
CXXLD stap-serverd
.../ld: stap_serverd-stap-serverd.o: undefined reference to symbol 'sem_getvalue@@GLIBC_2.2.5'
.../ld: note: 'sem_getvalue@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line
/lib64/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
Makefile.am | 2 +-
Makefile.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/Makefile.am
+++ b/Makefile.am
@@ -184,7 +184,7 @@ stap_serverd_SOURCES = stap-serverd.cxx
stap_serverd_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS)
stap_serverd_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS)
stap_serverd_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@
-stap_serverd_LDADD = $(nss_LIBS)
+stap_serverd_LDADD = $(nss_LIBS) -lpthread
if HAVE_AVAHI
stap_serverd_CFLAGS += $(avahi_CFLAGS)
stap_serverd_CXXFLAGS += $(avahi_CFLAGS)
--- a/Makefile.in
+++ b/Makefile.in
@@ -504,7 +504,7 @@ PHONIES = $(am__append_17) $(am__append_
@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(nss_CFLAGS) \
@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_24)
@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@
-@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_LDADD = $(nss_LIBS) \
+@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_LDADD = $(nss_LIBS) -lpthread \
@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_26)
@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_SOURCES = stap-gen-cert.cxx util.cxx nsscommon.cxx
@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS)