diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-08-23 16:25:11 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-08-23 16:33:33 +0400 |
commit | 73b897883f4830bc746f0e2547787aa684a2d204 (patch) | |
tree | 23f8bd7481b09c4a5b12b5119ac514eefbf2f719 | |
parent | 857ed45fd77688d2b7bb412201ba2c0def5e43bd (diff) | |
download | llvm-toolchain-3.5-73b897883f4830bc746f0e2547787aa684a2d204.tar.gz |
More fixes for GNU ld and Debian
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/patches/dyson-gnu-ld.patch | 40 | ||||
-rw-r--r-- | debian/patches/series | 2 |
3 files changed, 40 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 3c12373..5278182 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ llvm-toolchain-3.5 (1:3.5~+rc2-2~dyson1) UNRELEASED; urgency=medium * Package for Dyson: - - Use --whole-archive instead of -z allextract (dyson-gnu-ld.patch) + - Adjust options for GNU ld (dyson-gnu-ld.patch) - Use -Wl,--no-keep-memory (debian/rules) - Don't build lldb, it does not support illumos (debian/rules) - Use egrep and fine instead of ggrep and gfind diff --git a/debian/patches/dyson-gnu-ld.patch b/debian/patches/dyson-gnu-ld.patch index 7313dca..c55c5db 100644 --- a/debian/patches/dyson-gnu-ld.patch +++ b/debian/patches/dyson-gnu-ld.patch @@ -32,7 +32,7 @@ Index: llvm-3.5.git/tools/llvm-shlib/Makefile =================================================================== --- llvm-3.5.git.orig/tools/llvm-shlib/Makefile +++ llvm-3.5.git/tools/llvm-shlib/Makefile -@@ -59,7 +59,7 @@ ifeq ($(HOST_OS),Darwin) +@@ -59,27 +59,22 @@ ifeq ($(HOST_OS),Darwin) LLVMLibsOptions := $(LLVMLibsOptions) -all_load endif @@ -41,7 +41,17 @@ Index: llvm-3.5.git/tools/llvm-shlib/Makefile # Include everything from the .a's into the shared library. LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \ -Wl,--no-whole-archive -@@ -75,11 +75,6 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), L + endif + +-ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD GNU)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD GNU SunOS)) + # Add soname to the library. + LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT).1 -Wl,-Bsymbolic-functions + endif + +-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD SunOS)) + # Don't allow unresolved symbols. LLVMLibsOptions += -Wl,--no-undefined endif @@ -53,3 +63,29 @@ Index: llvm-3.5.git/tools/llvm-shlib/Makefile ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) SHLIB_STUBS := $(addprefix $(ObjDir)/, $(SHLIB_FRAG_NAMES)) +Index: llvm-3.5.git/Makefile.rules +=================================================================== +--- llvm-3.5.git.orig/Makefile.rules ++++ llvm-3.5.git/Makefile.rules +@@ -1356,7 +1356,7 @@ LD.Flags += -Wl,-exported_symbol,_main + endif + endif + +-ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux NetBSD FreeBSD GNU/kFreeBSD GNU)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux NetBSD FreeBSD GNU/kFreeBSD GNU SunOS)) + ifneq ($(ARCH), Mips) + LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map + endif +Index: llvm-3.5.git/clang/tools/libclang/Makefile +=================================================================== +--- llvm-3.5.git.orig/clang/tools/libclang/Makefile ++++ llvm-3.5.git/clang/tools/libclang/Makefile +@@ -34,7 +34,7 @@ USEDLIBS = clangIndex.a clangARCMigrate. + include $(CLANG_LEVEL)/Makefile + + # Add soname to the library. +-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU GNU/kFreeBSD)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU GNU/kFreeBSD SunOS)) + LLVMLibsOptions += -Wl,-soname,lib$(LIBRARYNAME)$(SHLIBEXT).$(SONAME_MAJOR) + endif + diff --git a/debian/patches/series b/debian/patches/series index 494108c..5fb41fc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -44,5 +44,5 @@ kfreebsd-lldb-gdbserver.diff #fix-lldb-3.5-rc2.diff gcc-compat-1.diff gcc-compat-2.diff -dyson-gnu-ld.patch dyson-coreutils.patch +dyson-gnu-ld.patch |