$OpenBSD: patch-cmake_modules_AddLLVM_cmake,v 1.2 2016/05/14 20:36:36 ajacoutot Exp $
--- cmake/modules/AddLLVM.cmake.orig	Fri Feb 12 12:52:29 2016
+++ cmake/modules/AddLLVM.cmake	Fri Mar 25 21:50:14 2016
@@ -177,7 +177,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
