summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-10-15 15:49:58 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-10-15 15:49:58 +0300
commit437ca207bcfa8675dfb675c2107ecaf01611d250 (patch)
tree38949263c709ac035f2d92aca78216f4d9c24663
parent6935a0bd2441bce5564a1802379b2b710fae4fe6 (diff)
downloadllvm-toolchain-5.0-437ca207bcfa8675dfb675c2107ecaf01611d250.tar.gz
Add dyson-gnu-ld.patch & dyson-coreutils.patch
-rw-r--r--debian/patches/dyson-coreutils.patch30
-rw-r--r--debian/patches/dyson-gnu-ld.patch36
-rw-r--r--debian/patches/series2
3 files changed, 68 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..391c1f0
--- /dev/null
+++ b/debian/patches/dyson-gnu-ld.patch
@@ -0,0 +1,36 @@
+Index: llvm-toolchain-5.0-5.0/cmake/modules/AddLLVM.cmake
+===================================================================
+--- llvm-toolchain-5.0-5.0.orig/cmake/modules/AddLLVM.cmake
++++ llvm-toolchain-5.0-5.0/cmake/modules/AddLLVM.cmake
+@@ -180,7 +180,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|AIX" OR WIN32))
++ if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin|AIX" OR WIN32))
+ set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,-O3")
+ endif()
+@@ -198,9 +198,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-5.0-5.0/tools/llvm-shlib/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-5.0-5.0.orig/tools/llvm-shlib/CMakeLists.txt
++++ llvm-toolchain-5.0-5.0/tools/llvm-shlib/CMakeLists.txt
+@@ -38,7 +38,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 (MINGW) OR (HAIKU) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf"
++if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly") OR "${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS") # FIXME: It should be "GNU ld for elf"
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/simple_version_script.map.in
+ ${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map)
diff --git a/debian/patches/series b/debian/patches/series
index 58de66c..4872b71 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -46,3 +46,5 @@ disable-path-test-failing.diff
silent-amd-tet.diff
disable-error-xray.diff
lldb-disable-swig-error.diff
+dyson-coreutils.patch
+dyson-gnu-ld.patch