summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2016-12-29 19:27:13 +0300
committerIgor Pashev <pashev.igor@gmail.com>2016-12-29 19:27:13 +0300
commitaf9bc6048f75920d7916539e1c95e53a317840bb (patch)
tree876eb249ce2f4ede68ad5b5286fbac98e73147e2
parent24254972eecd64b4752eadf0a1386e774a6b7291 (diff)
downloadllvm-toolchain-3.8-af9bc6048f75920d7916539e1c95e53a317840bb.tar.gz
Added dyson-coreutils.patch & dyson-gnu-ld.patch
-rw-r--r--debian/patches/dyson-coreutils.patch30
-rw-r--r--debian/patches/dyson-gnu-ld.patch50
-rw-r--r--debian/patches/series2
3 files changed, 82 insertions, 0 deletions
diff --git a/debian/patches/dyson-coreutils.patch b/debian/patches/dyson-coreutils.patch
new file mode 100644
index 0000000..73511d9
--- /dev/null
+++ b/debian/patches/dyson-coreutils.patch
@@ -0,0 +1,30 @@
+Index: llvm-3.5.git/utils/llvmdo
+===================================================================
+--- llvm-3.5.git.orig/utils/llvmdo
++++ llvm-3.5.git/utils/llvmdo
+@@ -166,12 +166,6 @@ files_to_ignore="\
+
+ if test -d "$TOPDIR" ; then
+ cd $TOPDIR
+- # Have to use the right "find" on a per-platform basis. Most platforms have
+- # Gnu find as "find", but Solaris does not.
+- case `uname -s` in
+- SunOS) find_prog=gfind ;;
+- *) find_prog=find ;;
+- esac
+ # Turn off file name generation (globbing) so that substitution of the
+ # variables doesn't cause the shell to create lists of file names
+ set -f
+Index: llvm-3.5.git/utils/llvmgrep
+===================================================================
+--- llvm-3.5.git.orig/utils/llvmgrep
++++ llvm-3.5.git/utils/llvmgrep
+@@ -28,7 +28,7 @@ fi
+ if test -d "$TOPDIR" ; then
+ cd $TOPDIR
+ case `uname -s` in
+- SunOS) grep_cmd="ggrep -H -n" ;;
++ SunOS) grep_cmd="egrep -H -n" ;;
+ Linux|Darwin) grep_cmd="egrep -H -n" ;;
+ *) grep_cmd="egrep -l -n" ;;
+ esac
diff --git a/debian/patches/dyson-gnu-ld.patch b/debian/patches/dyson-gnu-ld.patch
new file mode 100644
index 0000000..b257b34
--- /dev/null
+++ b/debian/patches/dyson-gnu-ld.patch
@@ -0,0 +1,50 @@
+Index: llvm-toolchain-3.8-3.8.1/cmake/modules/AddLLVM.cmake
+===================================================================
+--- llvm-toolchain-3.8-3.8.1.orig/cmake/modules/AddLLVM.cmake
++++ llvm-toolchain-3.8-3.8.1/cmake/modules/AddLLVM.cmake
+@@ -82,13 +82,8 @@ function(add_llvm_symbol_exports target_
+ DEPENDS ${export_file}
+ VERBATIM
+ COMMENT "Creating export file for ${target_name}")
+- if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+- set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+- LINK_FLAGS " -Wl,-M,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
+- else()
+ set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
+- endif()
+ else()
+ set(native_export_file "${target_name}.def")
+
+@@ -156,7 +151,7 @@ function(add_link_opts target_name)
+
+ # Pass -O3 to the linker. This enabled different optimizations on different
+ # linkers.
+- if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin|SunOS" OR WIN32))
++ if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32))
+ set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,-O3")
+ endif()
+@@ -174,9 +169,6 @@ function(add_link_opts target_name)
+ # ld64's implementation of -dead_strip breaks tools that use plugins.
+ set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,-dead_strip")
+- elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+- set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+- LINK_FLAGS " -Wl,-z -Wl,discard-unused=sections")
+ elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD)
+ # Object files are compiled with -ffunction-data-sections.
+ # Versions of bfd ld < 2.23.1 have a bug in --gc-sections that breaks
+Index: llvm-toolchain-3.8-3.8.1/tools/llvm-shlib/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-3.8-3.8.1.orig/tools/llvm-shlib/CMakeLists.txt
++++ llvm-toolchain-3.8-3.8.1/tools/llvm-shlib/CMakeLists.txt
+@@ -42,7 +42,7 @@ add_llvm_library(LLVM SHARED DISABLE_LLV
+ set_property(TARGET LLVM PROPERTY VERSION "1") # Append .1 to SONAME
+
+ list(REMOVE_DUPLICATES LIB_NAMES)
+-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "GNU" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "kFreeBSD") # FIXME: It should be "GNU ld for elf"
++if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "GNU" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "kFreeBSD" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
+ # GNU ld doesn't resolve symbols in the version script.
+ set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
+ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
diff --git a/debian/patches/series b/debian/patches/series
index c2845b9..9ba49d1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -53,3 +53,5 @@ silent-llvm-symbolizer.diff
upstream-msan-prevent-initialization-failure.diff
upstream-asan-msan-fix-reallocation-logic.diff
lit-force-lang.diff
+dyson-coreutils.patch
+dyson-gnu-ld.patch