[llvm] r253769 - Unbreak build on OpenBSD by not adding -Wl, -z, defs to linker flags.
Yaron Keren via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 22:33:54 PST 2015
Author: yrnkrn
Date: Sat Nov 21 00:33:54 2015
New Revision: 253769
URL: http://llvm.org/viewvc/llvm-project?rev=253769&view=rev
Log:
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
Modified:
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=253769&r1=253768&r2=253769&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Sat Nov 21 00:33:54 2015
@@ -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()
More information about the llvm-commits
mailing list