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-<feature> ...] [enable-<feature> ...] [-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";
# [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.
# no-egd do not compile support for the entropy-gathering daemon APIs
# [no-]zlib [don't] compile support for zlib compression.
# zlib-dynamic Like "zlib", but the zlib library is expected to be a shared
-# library and will be loaded in run-time by the OpenSSL library.
+# library and will be loaded at run-time by the OpenSSL library.
# sctp include SCTP support
# enable-quic include QUIC support (currently just for developers as the
# implementation is by no means complete and usable)
-Wsign-compare
-Wshadow
-Wformat
- -Wtype-limits
+ -Wno-type-limits
+ -Wno-tautological-constant-out-of-range-compare
-Wundef
-Werror
-Wmissing-prototypes
"autoload-config",
"bf",
"blake2",
+ "brotli",
+ "brotli-dynamic",
"buildtest-c++",
"bulk",
"cached-fetch",
"camellia",
"capieng",
+ "winstore",
"cast",
"chacha",
"cmac",
"comp",
"crypto-mdebug",
"ct",
+ "default-thread-pool",
"deprecated",
"des",
"devcryptoeng",
"stdio",
"tests",
"tfo",
+ "thread-pool",
"threads",
"tls",
"trace",
"whirlpool",
"zlib",
"zlib-dynamic",
+ "zstd",
+ "zstd-dynamic",
);
foreach my $proto ((@tls, @dtls))
{
our %disabled = ( # "what" => "comment"
"fips" => "default",
"asan" => "default",
+ "brotli" => "default",
+ "brotli-dynamic" => "default",
"buildtest-c++" => "default",
"crypto-mdebug" => "default",
"crypto-mdebug-backtrace" => "default",
"weak-ssl-ciphers" => "default",
"zlib" => "default",
"zlib-dynamic" => "default",
+ "zstd" => "default",
+ "zstd-dynamic" => "default",
);
# Note: => pair form used for aesthetics, not to truly make a hash table
"ssl" => [ "ssl3" ],
"ssl3-method" => [ "ssl3" ],
"zlib" => [ "zlib-dynamic" ],
+ "brotli" => [ "brotli-dynamic" ],
+ "zstd" => [ "zstd-dynamic" ],
"des" => [ "mdc2" ],
"ec" => [ "ec2m", "ecdsa", "ecdh", "sm2", "gost" ],
"dgram" => [ "dtls", "quic", "sctp" ],
"stdio" => [ "apps", "capieng", "egd" ],
"apps" => [ "tests" ],
"tests" => [ "external-tests" ],
- "comp" => [ "zlib" ],
+ "comp" => [ "zlib", "brotli", "zstd" ],
"sm3" => [ "sm2" ],
sub { !$disabled{"unit-test"} } => [ "heartbeats" ],
"fips" => [ "fips-securitychecks", "acvp-tests" ],
+ "threads" => [ "thread-pool" ],
+ "thread-pool" => [ "default-thread-pool" ],
+
"deprecated-3.0" => [ "engine", "srp" ]
);
{
delete $disabled{"zlib"};
}
+ elsif ($1 eq "brotli-dynamic")
+ {
+ delete $disabled{"brotli"};
+ }
+ elsif ($1 eq "zstd-dynamic")
+ {
+ delete $disabled{"zstd"};
+ }
my $algo = $1;
delete $disabled{$algo};
{
$withargs{zlib_include}=$1;
}
+ elsif (/^--with-brotli-lib=(.*)$/)
+ {
+ $withargs{brotli_lib}=$1;
+ }
+ elsif (/^--with-brotli-include=(.*)$/)
+ {
+ $withargs{brotli_include}=$1;
+ }
+ elsif (/^--with-zstd-lib=(.*)$/)
+ {
+ $withargs{zstd_lib}=$1;
+ }
+ elsif (/^--with-zstd-include=(.*)$/)
+ {
+ $withargs{zstd_include}=$1;
+ }
elsif (/^--with-fuzzer-lib=(.*)$/)
{
$withargs{fuzzer_lib}=$1;
}
unless ($disabled{ubsan} || defined $detected_sanitizers{ubsan}) {
- # -DPEDANTIC or -fnosanitize=alignment may also be required on some
- # platforms.
- push @{$config{cflags}}, "-fsanitize=undefined", "-fno-sanitize-recover=all";
+ push @{$config{cflags}}, "-fsanitize=undefined", "-fno-sanitize-recover=all", "-DPEDANTIC";
}
unless ($disabled{msan} || defined $detected_sanitizers{msan}) {
unless ($disabled{ktls}) {
$config{ktls}="";
+ my $cc = $config{CROSS_COMPILE}.$config{CC};
if ($target =~ m/^linux/) {
- my $usr = "/usr/$config{cross_compile_prefix}";
- chop($usr);
- if ($config{cross_compile_prefix} eq "") {
- $usr = "/usr";
- }
- my $minver = (4 << 16) + (13 << 8) + 0;
- my @verstr = split(" ",`cat $usr/include/linux/version.h | grep LINUX_VERSION_CODE`);
-
- if ($verstr[2] < $minver) {
+ system("printf '#include <sys/types.h>\n#include <linux/tls.h>' | $cc -E - >/dev/null 2>&1");
+ if ($? != 0) {
disable('too-old-kernel', 'ktls');
}
} elsif ($target =~ m/^BSD/) {
- my $cc = $config{CROSS_COMPILE}.$config{CC};
system("printf '#include <sys/types.h>\n#include <sys/ktls.h>' | $cc -E - >/dev/null 2>&1");
if ($? != 0) {
disable('too-old-freebsd', 'ktls');
}
}
+unless ($disabled{winstore}) {
+ unless ($target =~ /^(?:Cygwin|mingw|VC-|BC-)/) {
+ disable('not-windows', 'winstore');
+ }
+}
+
push @{$config{openssl_other_defines}}, "OPENSSL_NO_KTLS" if ($disabled{ktls});
# Get the extra flags used when building shared libraries and modules. We
if (!grep { $what eq $_ } ( 'buildtest-c++', 'fips', 'threads', 'shared',
'module', 'pic', 'dynamic-engine', 'makedepend',
- 'zlib-dynamic', 'zlib', 'sse2', 'legacy' )) {
+ 'sse2', 'legacy' )) {
(my $WHAT = uc $what) =~ s|-|_|g;
my $skipdir = $what;