aboutsummaryrefslogtreecommitdiffstats
path: root/tools
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
commit1c48377421e2c266244fbc6275e897dc66e22bda (patch)
tree219d7bd69c567718311b10cc419fcfc990685973 /tools
parent219ddf5626c526da298f255edb166f2ba5b75b1f (diff)
downloadexternal_llvm-1c48377421e2c266244fbc6275e897dc66e22bda.zip
external_llvm-1c48377421e2c266244fbc6275e897dc66e22bda.tar.gz
external_llvm-1c48377421e2c266244fbc6275e897dc66e22bda.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-shlib/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile
index 5238130..60b5435 100644
--- a/tools/llvm-shlib/Makefile
+++ b/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