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

llvm-svn: 241006
This commit is contained in:
Keno Fischer 2015-06-29 21:52:45 +00:00
parent c349cf3939
commit 121c1c54bf
3 changed files with 5 additions and 5 deletions

View File

@ -188,7 +188,7 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD))
# 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

View File

@ -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

View File

@ -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