Pass "-z defs" to the linker via "-Wl,-z,defs" rather than with gcc's -z
authorThomas Dwyer III <tomiii@tomiii.com>
Wed, 13 May 2020 17:32:47 +0000 (10:32 -0700)
committerMatt Caswell <matt@openssl.org>
Fri, 15 May 2020 09:11:36 +0000 (10:11 +0100)
flag (which is not supported by older compilers).

CLA: trivial

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11815)

Configurations/shared-info.pl

index a673c7c..461ce3c 100644 (file)
@@ -36,7 +36,7 @@ my %shared_info;
                 (grep /(?:^|\s)-fsanitize/,
                  @{$config{CFLAGS}}, @{$config{cflags}})
                 ? ''
                 (grep /(?:^|\s)-fsanitize/,
                  @{$config{CFLAGS}}, @{$config{cflags}})
                 ? ''
-                : '-defs',
+                : '-Wl,-z,defs',
         };
     },
     'bsd-gcc-shared' => sub { return $shared_info{'linux-shared'}; },
         };
     },
     'bsd-gcc-shared' => sub { return $shared_info{'linux-shared'}; },