X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fllvm-shlib%2FMakefile;h=19077a3858a6a5cb7aa0342faaa392c118f219f2;hb=247aed4710e8befde76da42b27313661dea7cf66;hp=2d2e2c55b80d6beade10144e937f053c59fb31a2;hpb=6fc30c26b7fa9e89c4e9ab99b7feab11389cc3f4;p=oota-llvm.git diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile index 2d2e2c55b80..19077a3858a 100644 --- a/tools/llvm-shlib/Makefile +++ b/tools/llvm-shlib/Makefile @@ -9,11 +9,13 @@ LEVEL := ../.. -LIBRARYNAME = LLVM-$(LLVMVersion) +LIBRARYNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX) +LIBRARYALIASNAME = LLVM-$(LLVMVersion) NO_BUILD_ARCHIVE := 1 LINK_LIBS_IN_SHARED := 1 SHARED_LIBRARY := 1 +SHARED_ALIAS := 1 include $(LEVEL)/Makefile.config @@ -49,29 +51,20 @@ ifeq ($(HOST_OS),Darwin) endif # Include everything from the .a's into the shared library. LLVMLibsOptions := $(LLVMLibsOptions) -all_load - # extra options to override libtool defaults - LLVMLibsOptions := $(LLVMLibsOptions) \ - -Wl,-dead_strip \ - -Wl,-seg1addr -Wl,0xE0000000 - - # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line - DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/') - ifneq ($(DARWIN_VERS),8) - LLVMLibsOptions := $(LLVMLibsOptions) \ - -Wl,-install_name \ - -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)" - endif endif -ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD OpenBSD GNU)) +ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD OpenBSD GNU Bitrig)) # Include everything from the .a's into the shared library. LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \ -Wl,--no-whole-archive +endif + +ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD GNU)) # Add soname to the library. LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT) endif -ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU)) +ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD)) # Don't allow unresolved symbols. LLVMLibsOptions += -Wl,--no-undefined endif