From 035867390874de412345fce6948219f2b780d796 Mon Sep 17 00:00:00 2001 From: Yaron Keren Date: Sat, 21 Nov 2015 06:33:54 +0000 Subject: [PATCH] Unbreak build on OpenBSD by not adding -Wl,-z,defs to linker flags. This is similar to the fix for FreeBSD in r226862. Without this patch, the build aborts when linkling libLTO.so, complaining about undefined references to assert2, cxa_atexit, etc. Patch by Stefan Kempf! http://reviews.llvm.org/D14236 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253769 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/HandleLLVMOptions.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index e86e1a169ce..9e4c4c5078a 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -132,7 +132,8 @@ endif() # Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO # build might work on ELF but fail on MachO/COFF. if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR - ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND + ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR + ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND NOT LLVM_USE_SANITIZER) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs") endif() -- 2.34.1