Fix building statically without any dso support
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 13 Sep 2019 08:45:29 +0000 (10:45 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 16 Sep 2019 16:27:50 +0000 (18:27 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9889)

Configure
INSTALL
crypto/include/internal/dso_conf.h.in

index 5a699836f32a09b8b2038857a898375e73744184..811bee81f542d65f61105d819336ff8935f79961 100755 (executable)
--- 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 2119cbae9e597d6ffe171ef41de5978583449a74..f61c6de05e080910d58ba5d72c35a6f70d06760a 100644 (file)
--- a/INSTALL
+++ b/INSTALL
                    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
index 2a76818b50d9803c99fef8b2443277f8be36d9b9..b2ace48a8002be590bbf02511ddc1392bcfc3f4c 100644 (file)
@@ -16,7 +16,7 @@
     # has support compiled in for them. Currently each method is enabled
     # by a define "DSO_<name>" ... 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";
     }