$OpenBSD: patch-CMakeLists_txt,v 1.13 2021/01/29 23:37:55 sthen Exp $

Avoid the broken libwsutil.so that gets generated with -pie -shared
(probably following tools/clang/lib/Driver/Tools.cpp r1.13 "push back
-pie to the linker if -pie is specified").

Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -952,7 +952,7 @@ endif()
 
 include(CheckCLinkerFlag)
 
-if(NOT CMAKE_C_COMPILER_ID MATCHES "MSVC" AND NOT OSS_FUZZ)
+if(NOT CMAKE_C_COMPILER_ID MATCHES "MSVC" AND NOT OSS_FUZZ AND NOT CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
 	#
 	# The -pie linker option produces a position-independent executable.
 	# Some Linux distributions have this enabled by default in the compiler,
