$OpenBSD: patch-CMakeLists_txt,v 1.6 2021/08/28 08:26:14 sthen Exp $

Symbol versioning triggers weird linking problems in dependent ports.

Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -500,10 +500,6 @@ endif()
 
 if(UNIX AND NOT APPLE)
   file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map "VERS_1 { global: *; };")
-  set(CMAKE_REQUIRED_FLAGS
-    "-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
-  check_c_source_compiles("int main(void) { return 0; }" HAVE_VERSION_SCRIPT)
-  set(CMAKE_REQUIRED_FLAGS)
   file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map)
   if(HAVE_VERSION_SCRIPT)
     message(STATUS "Linker supports GNU-style version scripts")
