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
This commit is contained in:
NAKAMURA Takumi 2010-10-28 06:45:57 +00:00
parent 219ddf5626
commit 1c48377421

View 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