$OpenBSD: patch-Configurations_shared-info_pl,v 1.1 2021/07/07 23:50:58 sthen Exp $

- Also match lld's "compatible with GNU linkers".

Probably not really used at current (1.1.1a) as $config{CC} isn't even
set up when this is called...

- override -Wl,-z,defs which errors out with undefined symbols for symbols
which are in libc

Index: Configurations/shared-info.pl
--- Configurations/shared-info.pl.orig
+++ Configurations/shared-info.pl
@@ -14,7 +14,7 @@
 sub detect_gnu_ld {
     my @lines =
         `$config{CROSS_COMPILE}$config{CC} -Wl,-V /dev/null 2>&1`;
-    return grep /^GNU ld/, @lines;
+    return grep /^GNU ld|GNU linker/, @lines;
 }
 sub detect_gnu_cc {
     my @lines =
@@ -32,11 +32,6 @@ my %shared_info;
         return {
             %{$shared_info{'gnu-shared'}},
             shared_defflag    => '-Wl,--version-script=',
-            dso_ldflags       =>
-                (grep /(?:^|\s)-fsanitize/,
-                 @{$config{CFLAGS}}, @{$config{cflags}})
-                ? ''
-                : '-Wl,-z,defs',
         };
     },
     'bsd-gcc-shared' => sub { return $shared_info{'linux-shared'}; },
