tools/llvm-shlib/Makefile: Support for FreeBSD and OpenBSD.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 28 Oct 2010 06:45:57 +0000 (06:45 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 28 Oct 2010 06:45:57 +0000 (06:45 +0000)
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

tools/llvm-shlib/Makefile

index 52381304bb93e0acb41f3e002ebdad53613dec9e..60b54350ee9837d234df38df785af88a5be92d78 100644 (file)
@@ -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