[Lldb-commits] [lldb] r241006 - Add -lpthread to LLDB shared lib link line unconditionally

Keno Fischer kfischer at college.harvard.edu
Mon Jun 29 14:52:46 PDT 2015


Author: kfischer
Date: Mon Jun 29 16:52:45 2015
New Revision: 241006

URL: http://llvm.org/viewvc/llvm-project?rev=241006&view=rev
Log:
Add -lpthread to LLDB shared lib link line unconditionally

Usually -lpthread is included due to LLVM link options,
but when LLVM threading is disabled, this does not happen.
pthread is still needed however because LLDB uses threading
regardless of whether LLVM is built with threading support or not.

Differential Revision: http://reviews.llvm.org/D5431

Modified:
    lldb/trunk/lib/Makefile
    lldb/trunk/tools/lldb-mi/Makefile
    lldb/trunk/tools/lldb-server/Makefile

Modified: lldb/trunk/lib/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lib/Makefile?rev=241006&r1=241005&r2=241006&view=diff
==============================================================================
--- lldb/trunk/lib/Makefile (original)
+++ lldb/trunk/lib/Makefile Mon Jun 29 16:52:45 2015
@@ -188,7 +188,7 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), L
     # Don't allow unresolved symbols.
     LLVMLibsOptions += -Wl,--no-undefined
     # Link in python
-    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses -lpanel
+    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses -lpanel -lpthread
     LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)
 endif
 
@@ -200,5 +200,5 @@ ifeq ($(HOST_OS),FreeBSD)
     LLVMLibsOptions += -Wl,--allow-shlib-undefined
     # Link in python
     LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -L/usr/local/lib -lexecinfo \
-                       -ledit -lncurses -lpanel
+                       -ledit -lncurses -lpanel -lpthread
 endif

Modified: lldb/trunk/tools/lldb-mi/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/Makefile?rev=241006&r1=241005&r2=241006&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/Makefile (original)
+++ lldb/trunk/tools/lldb-mi/Makefile Mon Jun 29 16:52:45 2015
@@ -22,11 +22,11 @@ ifeq ($(HOST_OS),Darwin)
 endif
 
 ifneq (,$(filter $(HOST_OS), Linux GNU/kFreeBSD))
-	LLVMLibsOptions += -Wl,-rpath,$(LibDir)
+	LLVMLibsOptions += -Wl,-rpath,$(LibDir) -lpthread
 endif
 
 ifeq ($(HOST_OS),FreeBSD)
 	CPP.Flags += -I/usr/include/edit #-v
-	LLVMLibsOptions += -Wl,-rpath,$(LibDir)
+	LLVMLibsOptions += -Wl,-rpath,$(LibDir) -lpthread
 endif
 

Modified: lldb/trunk/tools/lldb-server/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/Makefile?rev=241006&r1=241005&r2=241006&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/Makefile (original)
+++ lldb/trunk/tools/lldb-server/Makefile Mon Jun 29 16:52:45 2015
@@ -21,5 +21,5 @@ ifeq ($(HOST_OS),Darwin)
 endif
 
 ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU/kFreeBSD))
-	LLVMLibsOptions += -Wl,-rpath,$(LibDir)
+	LLVMLibsOptions += -Wl,-rpath,$(LibDir) -lpthread
 endif





More information about the lldb-commits mailing list