From 8dcd57461972dceaaf014b71d173d0a8758e7054 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 13 Sep 2019 10:45:29 +0200 Subject: [PATCH] Fix building statically without any dso support Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/9889) --- Configure | 5 +++-- INSTALL | 3 +++ crypto/include/internal/dso_conf.h.in | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Configure b/Configure index 5a699836f3..811bee81f5 100755 --- a/Configure +++ b/Configure @@ -346,6 +346,7 @@ my @disablables = ( "dgram", "dh", "dsa", + "dso", "dtls", "dynamic-engine", "ec", @@ -423,7 +424,6 @@ my %deprecated_disablables = ( "buf-freelists" => undef, "ripemd" => "rmd160", "ui" => "ui-console", - "dso" => "", # Empty string means we're silent about it ); # All of the following are disabled by default: @@ -480,6 +480,7 @@ my @disable_cascades = ( # Without position independent code, there can be no shared libraries or DSOs "pic" => [ "shared" ], "shared" => [ "dynamic-engine" ], + "dso" => [ "dynamic-engine" ], "engine" => [ "afalgeng", "devcryptoeng" ], # no-autoalginit is only useful when building non-shared @@ -1181,7 +1182,7 @@ foreach my $what (sort keys %disabled) { my $macro = $disabled_info{$what}->{macro} = "OPENSSL_NO_$WHAT"; if ((grep { $what eq $_ } @{$config{sdirs}}) - && $what ne 'async' && $what ne 'err') { + && $what ne 'async' && $what ne 'err' && $what ne 'dso') { @{$config{sdirs}} = grep { $what ne $_} @{$config{sdirs}}; $disabled_info{$what}->{skipped} = [ catdir('crypto', $what) ]; diff --git a/INSTALL b/INSTALL index 2119cbae9e..f61c6de05e 100644 --- a/INSTALL +++ b/INSTALL @@ -351,6 +351,9 @@ Don't build support for datagram based BIOs. Selecting this option will also force the disabling of DTLS. + no-dso + Don't build support for loading Dynamic Shared Objects. + enable-devcryptoeng Build the /dev/crypto engine. It is automatically selected on BSD implementations, in which case it can be disabled with diff --git a/crypto/include/internal/dso_conf.h.in b/crypto/include/internal/dso_conf.h.in index 2a76818b50..b2ace48a80 100644 --- a/crypto/include/internal/dso_conf.h.in +++ b/crypto/include/internal/dso_conf.h.in @@ -16,7 +16,7 @@ # has support compiled in for them. Currently each method is enabled # by a define "DSO_" ... we translate the "dso_scheme" config # string entry into using the following logic; - my $scheme = uc $target{dso_scheme}; + my $scheme = $disabled{dso} ? undef : uc $target{dso_scheme}; if (!$scheme) { $scheme = "NONE"; } -- 2.25.1