$OpenBSD: patch-src_runtime_Config_generic-openbsd,v 1.3 2018/03/08 15:17:39 sthen Exp $

clang-5.0.0 doesn't pass -export-dynamic to the linker, instead it
passes a bogus -e export-dynamic to ld(1). Just use -Wl,--export-dynamic.

Don't try to guess (wrong) with clang. Just assume we have pie

Index: src/runtime/Config.generic-openbsd
--- src/runtime/Config.generic-openbsd.orig
+++ src/runtime/Config.generic-openbsd
@@ -9,7 +9,7 @@
 # provided with absolutely no warranty. See the COPYING and CREDITS
 # files for more information.
 
-LINKFLAGS += -export-dynamic -Wl,-z,wxneeded
+LINKFLAGS += -Wl,--export-dynamic -Wl,-z,wxneeded
 OS_LIBS += -lutil
 
 ifdef LISP_FEATURE_SB_THREAD
@@ -17,9 +17,7 @@ CFLAGS += -pthread
 OS_LIBS += -pthread
 endif
 
-ifneq ($(shell $(CC) -dM -E - < /dev/null 2>/dev/null | grep -e '__clang__'),)
 CFLAGS += -fno-pie
 LINKFLAGS += -Wl,-nopie
 LDFLAGS += -nopie
 __LDFLAGS__ += -nopie
-endif
