Configure: Better detection of '-static' in @{$config{LDFLAGS}}

@{$config{LDFLAGS}} isn't necessarily split up in pieces, so we need
to check for '-static' with a regexp rather than with an exact string
match.

Fixes #10867

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10878)
This commit is contained in:
Richard Levitte 2020-01-17 12:47:44 +01:00
parent 8baa49aeac
commit cf0843c091

View File

@ -1513,7 +1513,7 @@ if ($strict_warnings)
}
}
if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) {
if (grep { $_ =~ /(?:^|\s)-static(?:\s|$)/ } @{$config{LDFLAGS}}) {
disable('static', 'pic', 'threads');
}