pkgsrc/lang/llvm/patches/patch-tools_llvm-shlib_CMakeLists.txt
adam 07c17ba550 llvm: updated to 9.0.0
9.0.0:
Non-comprehensive list of changes in this release:
* Two new extension points, namely EP_FullLinkTimeOptimizationEarly and EP_FullLinkTimeOptimizationLast are available for plugins to specialize the legacy pass manager full LTO pipeline.
* llvm-objcopy/llvm-strip got support for COFF object files/executables, supporting the most common copying/stripping options.
* The CMake parameter CLANG_ANALYZER_ENABLE_Z3_SOLVER has been replaced by LLVM_ENABLE_Z3_SOLVER.
* The RISCV target is no longer “experimental” (see Changes to the RISCV Target below for more details).
* The ORCv1 JIT API has been deprecated. Please see Transitioning from ORCv1 to ORCv2.
* Support for target-independent hardware loops in IR has been added, with PowerPC and Arm implementations.
2019-10-19 13:52:40 +00:00

34 lines
1.7 KiB
Text

$NetBSD: patch-tools_llvm-shlib_CMakeLists.txt,v 1.6 2019/10/19 13:52:40 adam Exp $
Use the Linux style linking everywhere except Darwin and SunOS.
--- tools/llvm-shlib/CMakeLists.txt.orig 2019-08-29 08:58:14.000000000 +0000
+++ tools/llvm-shlib/CMakeLists.txt
@@ -45,13 +45,11 @@ if(LLVM_BUILD_LLVM_DYLIB)
add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${INSTALL_WITH_TOOLCHAIN} ${SOURCES})
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 "GNU")
- OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
- OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
- OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
- OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")) # FIXME: It should be "GNU ld for elf"
+ if("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
+ set(LIB_NAMES -Wl,-Bsymbolic -Wl,-z -Wl,allextract ${LIB_NAMES} -Wl,-z -Wl,defaultextract)
+ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+ set(LIB_NAMES -Wl,-all_load ${LIB_NAMES})
+ else()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/simple_version_script.map.in
${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map)
@@ -62,8 +60,6 @@ if(LLVM_BUILD_LLVM_DYLIB)
# Solaris ld does not accept global: *; so there is no way to version *all* global symbols
set(LIB_NAMES -Wl,--version-script,${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map ${LIB_NAMES})
endif()
- elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
- set(LIB_NAMES -Wl,-all_load ${LIB_NAMES})
endif()
target_link_libraries(LLVM PRIVATE ${LIB_NAMES})