Configure: for '-z defs', also check $config{cflags}

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)
This commit is contained in:
Richard Levitte 2019-05-21 13:43:41 +02:00
parent c04b66b18d
commit 54af7f5502

View file

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