Configure: for '-z defs', also check $config{cflags}
authorRichard Levitte <levitte@openssl.org>
Tue, 21 May 2019 11:43:41 +0000 (13:43 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 21 May 2019 11:50:27 +0000 (13:50 +0200)
When sanitize options are added as 'enable-msan' or similar, the
-fsanitize C flags is set in $config{cflags} rather than
$config{CFLAGS}, so we need to check both.

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

Configurations/shared-info.pl

index 2e2d28d95e9b9b1587aa9f04812b1c89a1b83c11..f9420785f245a54e66854efc1bcc8b8d5bb5d8d8 100644 (file)
@@ -33,7 +33,8 @@ my %shared_info;
             %{$shared_info{'gnu-shared'}},
             shared_defflag    => '-Wl,--version-script=',
             dso_ldflags       =>
-                (grep /(?:^|\s)-fsanitize/, @{$config{CFLAGS}})
+                (grep /(?:^|\s)-fsanitize/,
+                 @{$config{CFLAGS}}, @{$config{cflags}})
                 ? ''
                 : '-z defs',
         };