mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
Configure: add thread-pool and default-thread-pool
Signed-off-by: Čestmír Kalina <ckalina@redhat.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12255)
This commit is contained in:
parent
9ab57f29c7
commit
fdb11e1bcb
24
Configure
24
Configure
@ -27,7 +27,7 @@ use OpenSSL::config;
|
||||
my $orig_death_handler = $SIG{__DIE__};
|
||||
$SIG{__DIE__} = \&death_handler;
|
||||
|
||||
my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]\n";
|
||||
my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]thread-pool] [[no-]default-thread-pool] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]\n";
|
||||
|
||||
my $banner = <<"EOF";
|
||||
|
||||
@ -81,6 +81,10 @@ EOF
|
||||
# [no-]threads [don't] try to create a library that is suitable for
|
||||
# multithreaded applications (default is "threads" if we
|
||||
# know how to do it)
|
||||
# [no-]thread-pool
|
||||
# [don't] allow thread pool functionality
|
||||
# [no-]default-thread-pool
|
||||
# [don't] allow default thread pool functionality
|
||||
# [no-]shared [don't] try to create shared libraries when supported.
|
||||
# [no-]pic [don't] try to build position independent code when supported.
|
||||
# If disabled, it also disables shared and dynamic-engine.
|
||||
@ -426,6 +430,7 @@ my @disablables = (
|
||||
"comp",
|
||||
"crypto-mdebug",
|
||||
"ct",
|
||||
"default-thread-pool",
|
||||
"deprecated",
|
||||
"des",
|
||||
"devcryptoeng",
|
||||
@ -497,6 +502,7 @@ my @disablables = (
|
||||
"stdio",
|
||||
"tests",
|
||||
"tfo",
|
||||
"thread-pool",
|
||||
"threads",
|
||||
"tls",
|
||||
"trace",
|
||||
@ -806,6 +812,8 @@ while (@argvcopy)
|
||||
s /^-?-?shared$/enable-shared/;
|
||||
s /^sctp$/enable-sctp/;
|
||||
s /^threads$/enable-threads/;
|
||||
s /^thread-pool$/enable-thread-pool/;
|
||||
s /^default-thread-pool$/enable-default-thread-pool/;
|
||||
s /^zlib$/enable-zlib/;
|
||||
s /^zlib-dynamic$/enable-zlib-dynamic/;
|
||||
s /^fips$/enable-fips/;
|
||||
@ -1392,6 +1400,14 @@ if (grep { $_ =~ /(?:^|\s)-static(?:\s|$)/ } @{$config{LDFLAGS}}) {
|
||||
disable('static', 'pic', 'threads');
|
||||
}
|
||||
|
||||
if ($disabled{threads}) {
|
||||
disable('unavailable', 'thread-pool');
|
||||
}
|
||||
|
||||
if ($disabled{"thread-pool"}) {
|
||||
disable('unavailable', 'default-thread-pool');
|
||||
}
|
||||
|
||||
# Allow overriding the build file name
|
||||
$config{build_file} = env('BUILDFILE') || $target{build_file} || "Makefile";
|
||||
|
||||
@ -1490,6 +1506,12 @@ foreach (grep /^-fsanitize=/, @{$config{CFLAGS} || []}) {
|
||||
unless($disabled{threads}) {
|
||||
push @{$config{openssl_feature_defines}}, "OPENSSL_THREADS";
|
||||
}
|
||||
unless($disabled{"thread-pool"}) {
|
||||
push @{$config{openssl_feature_defines}}, "OPENSSL_THREAD_POOL";
|
||||
}
|
||||
unless($disabled{"default-thread-pool"}) {
|
||||
push @{$config{openssl_feature_defines}}, "OPENSSL_DEFAULT_THREAD_POOL";
|
||||
}
|
||||
|
||||
my $no_shared_warn=0;
|
||||
if (($target{shared_target} // '') eq "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user