summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2010-10-28 06:45:57 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2010-10-28 06:45:57 +0000
commita1d4430cc8031635caed6f426fc50b1f1b1c5d95 (patch)
treeb8610ed43355f8ed271a808dcccdffd5af3a7e0c
parentb7139c43ae6627b44f4ba1304a914894f5bb0439 (diff)
downloadbcm5719-llvm-a1d4430cc8031635caed6f426fc50b1f1b1c5d95.tar.gz
bcm5719-llvm-a1d4430cc8031635caed6f426fc50b1f1b1c5d95.zip
tools/llvm-shlib/Makefile: Support for FreeBSD and OpenBSD.
Thanks to Yuri Gribov and Vladimir Kirillov! *BSD(s) have environ(7) in CRT startup and cannot resolve "environ" at linking llvm.so. environ(7) is used inlib/System/Unix/Program.inc. llvm-svn: 117528
-rw-r--r--llvm/tools/llvm-shlib/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/llvm-shlib/Makefile b/llvm/tools/llvm-shlib/Makefile
index 52381304bb9..60b54350ee9 100644
--- a/llvm/tools/llvm-shlib/Makefile
+++ b/llvm/tools/llvm-shlib/Makefile
@@ -61,10 +61,13 @@ ifeq ($(HOST_OS),Darwin)
endif
endif
-ifeq ($(HOST_OS), Linux)
+ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD OpenBSD))
# Include everything from the .a's into the shared library.
LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \
-Wl,--no-whole-archive
+endif
+
+ifeq ($(HOST_OS),Linux)
# Don't allow unresolved symbols.
LLVMLibsOptions += -Wl,--no-undefined
endif
OpenPOWER on IntegriCloud