openbsd-ports/devel/llvm/patches/patch-cmake_modules_AddLLVM_cmake
ajacoutot e563677b2c Update to llvm-5.0.0rc4.
Tested on amd64, i386, sparc64
from Brad (maintainer)
2017-09-01 06:40:28 +00:00

14 lines
814 B
Plaintext

$OpenBSD: patch-cmake_modules_AddLLVM_cmake,v 1.4 2017/09/01 06:40:28 ajacoutot Exp $
Index: cmake/modules/AddLLVM.cmake
--- cmake/modules/AddLLVM.cmake.orig
+++ cmake/modules/AddLLVM.cmake
@@ -201,7 +201,7 @@ function(add_link_opts target_name)
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)
+ elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
# Object files are compiled with -ffunction-data-sections.
# Versions of bfd ld < 2.23.1 have a bug in --gc-sections that breaks
# tools that use plugins. Always pass --gc-sections once we require