From 1c48377421e2c266244fbc6275e897dc66e22bda Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 28 Oct 2010 06:45:57 +0000 Subject: 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 --- tools/llvm-shlib/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/llvm-shlib/Makefile') diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile index 52381304bb..60b54350ee 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 -- cgit v1.2.3