diff options
Diffstat (limited to 'debian/patches/dyson-gnu-ld.patch')
-rw-r--r-- | debian/patches/dyson-gnu-ld.patch | 36 |
1 files changed, 36 insertions, 0 deletions
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) |