[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Sat Feb 20 15:52:46 UTC 2016


The branch master has been updated
       via  f27f64e17ad2b5b8bdacbfffb486d9b1f05b9b71 (commit)
       via  2dd400bd435b3be3240b6d509a9a6737a642c37c (commit)
       via  343ec2b083b82ccf9ce96020bc95320390296f1f (commit)
       via  45502bfe19fb03c9f343b03fa6434ee0bece8428 (commit)
      from  011b967508342a5c940a0c75193f742c0b13bdc4 (commit)


- Log -----------------------------------------------------------------
commit f27f64e17ad2b5b8bdacbfffb486d9b1f05b9b71
Author: Richard Levitte <levitte at openssl.org>
Date:   Sat Feb 20 00:10:43 2016 +0100

    Unified on VMS - install dynamic engines if there are any
    
    Don't check for no_shared
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit 2dd400bd435b3be3240b6d509a9a6737a642c37c
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Feb 19 22:13:11 2016 +0100

    Run the TLSProxy based tests as long as dynamic engines are built.
    
    They depend on this feature because they use the engine ossltest,
    which is only available as a dynamic engine.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit 343ec2b083b82ccf9ce96020bc95320390296f1f
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Feb 19 22:08:37 2016 +0100

    Build dynamic engines even if configured "no-shared"
    
    Until now, the engines in engines/ were only built as dynamicaly
    loadable ones if shared libraries were built.
    
    We not dissociate the two and can build dynamicaly loadable engines
    even if we only build static libcrypto and libssl.  This is controlled
    with the option (enable|disable|no)-static-engine, defaulting to
    no-static-engine.
    
    Note that the engines in crypto/engine/ (dynamic and cryptodev) will
    always be built into libcrypto.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit 45502bfe19fb03c9f343b03fa6434ee0bece8428
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Feb 19 22:02:41 2016 +0100

    Always build library object files with shared library cflags
    
    This takes us away from the idea that we know exactly how our static
    libraries are going to get used.  Instead, we make them available to
    build shareable things with, be it other shared libraries or DSOs.
    
    On the other hand, we also have greater control of when the shared
    library cflags.  They will never be used with object files meant got
    binaries, such as apps/openssl or test/test*.
    
    With unified, we take this a bit further and prepare for having to
    deal with extra cflags specifically to be used with DSOs (dynamic
    engines), libraries and binaries (applications).
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 Configurations/README                 |  7 +++--
 Configurations/README.design          |  9 ++++--
 Configurations/common.tmpl            |  6 ++--
 Configurations/descrip.mms.tmpl       |  8 +++--
 Configurations/unix-Makefile.tmpl     | 17 +++++++----
 Configure                             | 55 +++++++++++++++++++----------------
 Makefile.in                           |  7 +++--
 crypto/Makefile.in                    |  2 +-
 crypto/aes/Makefile.in                |  2 +-
 crypto/asn1/Makefile.in               |  2 +-
 crypto/async/Makefile.in              |  2 +-
 crypto/bf/Makefile.in                 |  2 +-
 crypto/bio/Makefile.in                |  2 +-
 crypto/bn/Makefile.in                 |  2 +-
 crypto/buffer/Makefile.in             |  2 +-
 crypto/camellia/Makefile.in           |  2 +-
 crypto/cast/Makefile.in               |  2 +-
 crypto/chacha/Makefile.in             |  2 +-
 crypto/cmac/Makefile.in               |  2 +-
 crypto/cms/Makefile.in                |  2 +-
 crypto/comp/Makefile.in               |  2 +-
 crypto/conf/Makefile.in               |  2 +-
 crypto/ct/Makefile.in                 |  2 +-
 crypto/des/Makefile.in                |  2 +-
 crypto/dh/Makefile.in                 |  2 +-
 crypto/dsa/Makefile.in                |  2 +-
 crypto/dso/Makefile.in                |  2 +-
 crypto/ec/Makefile.in                 |  2 +-
 crypto/engine/Makefile.in             |  2 +-
 crypto/err/Makefile.in                |  2 +-
 crypto/evp/Makefile.in                |  2 +-
 crypto/hmac/Makefile.in               |  2 +-
 crypto/idea/Makefile.in               |  2 +-
 crypto/kdf/Makefile.in                |  2 +-
 crypto/lhash/Makefile.in              |  2 +-
 crypto/md2/Makefile.in                |  2 +-
 crypto/md4/Makefile.in                |  2 +-
 crypto/md5/Makefile.in                |  2 +-
 crypto/mdc2/Makefile.in               |  2 +-
 crypto/modes/Makefile.in              |  2 +-
 crypto/objects/Makefile.in            |  2 +-
 crypto/ocsp/Makefile.in               |  2 +-
 crypto/pem/Makefile.in                |  2 +-
 crypto/pkcs12/Makefile.in             |  2 +-
 crypto/pkcs7/Makefile.in              |  2 +-
 crypto/poly1305/Makefile.in           |  2 +-
 crypto/rand/Makefile.in               |  2 +-
 crypto/rc2/Makefile.in                |  2 +-
 crypto/rc4/Makefile.in                |  2 +-
 crypto/rc5/Makefile.in                |  2 +-
 crypto/ripemd/Makefile.in             |  2 +-
 crypto/rsa/Makefile.in                |  2 +-
 crypto/seed/Makefile.in               |  2 +-
 crypto/sha/Makefile.in                |  2 +-
 crypto/srp/Makefile.in                |  2 +-
 crypto/stack/Makefile.in              |  2 +-
 crypto/ts/Makefile.in                 |  2 +-
 crypto/txt_db/Makefile.in             |  2 +-
 crypto/ui/Makefile.in                 |  2 +-
 crypto/whrlpool/Makefile.in           |  2 +-
 crypto/x509/Makefile.in               |  2 +-
 crypto/x509v3/Makefile.in             |  2 +-
 engines/Makefile.in                   |  4 +--
 engines/build.info                    |  2 +-
 ssl/Makefile.in                       |  2 +-
 test/recipes/70-test_sslcertstatus.t  |  7 ++---
 test/recipes/70-test_sslextension.t   |  7 ++---
 test/recipes/70-test_sslsessiontick.t |  7 ++---
 test/recipes/70-test_sslskewith0p.t   |  7 ++---
 test/recipes/70-test_sslvertol.t      |  7 ++---
 test/recipes/70-test_tlsextms.t       |  7 ++---
 test/recipes/90-test_networking.t     |  7 ++---
 util/mk1mf.pl                         | 11 ++++---
 util/pl/VC-32.pl                      |  4 +--
 74 files changed, 146 insertions(+), 145 deletions(-)

diff --git a/Configurations/README b/Configurations/README
index 58c4d96..454c8f3 100644
--- a/Configurations/README
+++ b/Configurations/README
@@ -488,7 +488,8 @@ They are all expected to return a string with the lines they produce.
                         src2obj(obj => "PATH/TO/objectfile",
                                 srcs => [ "PATH/TO/sourcefile", ... ],
                                 deps => [ "dep1", ... ],
-                                incs => [ "INCL/PATH", ... ]);
+                                incs => [ "INCL/PATH", ... ]
+                                intent => one of "lib", "dso", "bin" );
 
                   'obj' has the intended object file *without*
                   extension, src2obj() is expected to add that.
@@ -496,7 +497,9 @@ They are all expected to return a string with the lines they produce.
                   object file, with the first item being the source
                   file that directly corresponds to the object file.
                   'deps' is a list of explicit dependencies.  'incs'
-                  is a list of include file directories.
+                  is a list of include file directories.  Finally,
+                  'intent' indicates what this object file is going
+                  to be used for.
 
     obj2lib     - function that produces build file lines to build a
                   static library file ("libfoo.a" in Unix terms) from
diff --git a/Configurations/README.design b/Configurations/README.design
index 80839fa..362b967 100644
--- a/Configurations/README.design
+++ b/Configurations/README.design
@@ -392,15 +392,18 @@ etc.
                         src2obj(obj => "PATH/TO/objectfile",
                                 srcs => [ "PATH/TO/sourcefile", ... ],
                                 deps => [ "dep1", ... ],
-                                incs => [ "INCL/PATH", ... ]);
+                                incs => [ "INCL/PATH", ... ]
+                                intent => one of "lib", "dso", "bin" );
 
                   'obj' has the intended object file *without*
                   extension, src2obj() is expected to add that.
                   'srcs' has the list of source files to build the
                   object file, with the first item being the source
                   file that directly corresponds to the object file.
-                  'deps' is a list of dependencies.  'incs' is a list
-                  of include file directories.
+                  'deps' is a list of explicit dependencies.  'incs'
+                  is a list of include file directories.  Finally,
+                  'intent' indicates what this object file is going
+                  to be used for.
 
     obj2lib     - function that produces build file lines to build a
                   static library file ("libfoo.a" in Unix terms) from
diff --git a/Configurations/common.tmpl b/Configurations/common.tmpl
index f0860dd..196441c 100644
--- a/Configurations/common.tmpl
+++ b/Configurations/common.tmpl
@@ -37,12 +37,14 @@
      my $obj = shift;
      (my $obj_no_o = $obj) =~ s|\.o$||;
      my $bin = shift;
+     my %opts = @_;
      if (@{$unified_info{sources}->{$obj}}) {
          $OUT .= src2obj(obj => $obj_no_o,
                          srcs => $unified_info{sources}->{$obj},
                          deps => [ reducedepends(resolvedepends($obj)) ],
                          incs => [ @{$unified_info{includes}->{$bin}},
-                                   @{$unified_info{includes}->{$obj}} ]);
+                                   @{$unified_info{includes}->{$obj}} ],
+                         %opts);
      }
  }
 
@@ -78,7 +80,7 @@
                      objs => [ map { (my $x = $_) =~ s|\.o$||; $x }
                                @{$unified_info{sources}->{$lib}} ],
                      deps => [ resolvedepends($lib) ]);
-     map { doobj($_, $lib, intent => "lib") } @{$unified_info{sources}->{$lib}};
+     map { doobj($_, $lib, intent => "dso") } @{$unified_info{sources}->{$lib}};
  }
 
  # dobin is responsible for building programs.  It will call obj2bin,
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl
index 1d72589..279400c 100644
--- a/Configurations/descrip.mms.tmpl
+++ b/Configurations/descrip.mms.tmpl
@@ -317,11 +317,13 @@ install_runtime : check_INSTALLTOP
                 ossl_installroot:[000000]openssl.cnf
 
 install_engines : check_INSTALLTOP
-        @ {- output_off() if $config{no_shared}; "" -} !
+        @ {- output_off() unless scalar @{$unified_info{engines}}; "" -} !
         @ WRITE SYS$OUTPUT "*** Installing engines"
         CREATE/DIR ossl_installroot:[ENGINES.'arch']
-        COPY/PROT=W:RE [.ENGINES]*.EXE ossl_installroot:[ENGINES.'arch']
-        @ {- output_on() if $config{no_shared}; "" -} !
+        {- join("\n        ",
+                map { "COPY/PROT=W:RE $_.EXE ossl_installroot:[ENGINES.'arch']" }
+                grep(!m|ossltest$|i, @{$unified_info{engines}})) -}
+        @ {- output_on() unless scalar @{$unified_info{engines}}; "" -} !
 
 install_config : [.VMS]openssl_startup.com [.VMS]openssl_shutdown.com -
                  check_INSTALLTOP
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 9dc6d7d..61ee7a6 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -43,7 +43,6 @@
      # given libname with the simple shared extension (possible SO version
      # removed).  This differs from shlib_simple() by being unconditional.
      sub dso {
-         return () if $config{no_shared};
          my $engine = shift;
 
          return $engine . '$(DSO_EXT)';
@@ -149,6 +148,7 @@ CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
 LDFLAGS= {- $config{lflags} -}
 PLIB_LDFLAGS= {- $config{plib_lflags} -}
 EX_LIBS= {- $config{ex_libs} -}
+SHARED_CFLAGS={- $target{shared_cflag} || "" -}
 SHARED_LDFLAGS={- $target{shared_ldflag}
                   # Unlike other OSes (like Solaris, Linux, Tru64,
                   # IRIX) BSD run-time linkers (tested OpenBSD, NetBSD
@@ -164,6 +164,8 @@ SHARED_LDFLAGS={- $target{shared_ldflag}
                   . ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
                      ? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
 SHARED_RCFLAGS={- $target{shared_rcflag} -}
+DSO_CFLAGS={- $target{shared_cflag} || "" -}
+BIN_CFLAGS={- "" -}
 
 PERL={- $config{perl} -}
 
@@ -823,25 +825,28 @@ configdata.pm: {- $config{build_file_template} -} $(SRCDIR)/Configure $(SRCDIR)/
       my $obj = $args{obj};
       my $srcs = join(" ", @{$args{srcs}});
       my $deps = join(" ", @{$args{srcs}}, @{$args{deps}});
-      my $incs = join(" ", map { " -I".$_ } @{$args{incs}});
+      my $incs = join("", map { " -I".$_ } @{$args{incs}});
+      my $ecflags = { lib => '$(SHARED_CFLAGS)',
+                      dso => '$(DSO_CFLAGS)',
+                      bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
       my $makedepprog = $config{makedepprog};
       if ($makedepprog eq "makedepend") {
           return <<"EOF";
 $obj\$(DEP_EXT): $deps
 	rm -f \$\@.tmp; touch \$\@.tmp
-	\$(MAKEDEPEND) -f\$\@.tmp -o"|$obj" -- \$(CFLAGS)$incs -- $srcs \\
+	\$(MAKEDEPEND) -f\$\@.tmp -o"|$obj" -- \$(CFLAGS) $ecflags$incs -- $srcs \\
 	    2>/dev/null
 	sed -e 's/^.*|//' -e 's/ \\/\\(\\\\.\\|[^ ]\\)*//g' -e '/: *\$\$/d' -e '/^\\(#.*\\| *\\)\$\$/d' \$\@.tmp > \$\@
 	rm \$\@.tmp
 $obj\$(OBJ_EXT): $obj\$(DEP_EXT)
-	\$(CC) \$(CFLAGS)$incs -c -o \$\@ $srcs
+	\$(CC) \$(CFLAGS) $ecflags$incs -c -o \$\@ $srcs
 EOF
       }
       return <<"EOF";
 $obj\$(DEP_EXT): $deps
-	\$(CC) \$(CFLAGS)$incs -MM -MF \$\@ -MQ $obj $srcs
+	\$(CC) \$(CFLAGS) $ecflags$incs -MM -MF \$\@ -MQ $obj $srcs
 $obj\$(OBJ_EXT): $obj\$(DEP_EXT)
-	\$(CC) \$(CFLAGS)$incs -c -o \$\@ $srcs
+	\$(CC) \$(CFLAGS) $ecflags$incs -c -o \$\@ $srcs
 EOF
   }
   # On Unix, we build shlibs from static libs, so we're ignoring the
diff --git a/Configure b/Configure
index 4136673..1cb5ace 100755
--- a/Configure
+++ b/Configure
@@ -261,7 +261,7 @@ my @disablables = (
     "dsa",
     "dso",
     "dtls",
-    "dynamic[-_]engine",
+    "dynamic-engine",
     "ec",
     "ec2m",
     "ecdh",
@@ -335,6 +335,7 @@ my %disabled = ( # "what"         => "comment"
 		 "sctp"           => "default",
 		 "shared"         => "default",
 		 "ssl-trace"	  => "default",
+		 "static-engine"  => "default",
 		 "unit-test"	  => "default",
 		 "zlib"           => "default",
 		 "crypto-mdebug"  => "default",
@@ -380,6 +381,9 @@ my @disable_cascades = (
     "tlsext"		=> [ "srp", "heartbeats" ],
 
     "crypto-mdebug"     => [ "crypto-mdebug-backtrace" ],
+
+    # Without DSO, we can't load dynamic engines, so don't build them dynamic
+    "dso"               => [ "dynamic-engine" ],
     );
 
 # Avoid protocol support holes.  Also disable all versions below N, if version
@@ -544,6 +548,14 @@ foreach (@argvcopy)
                                 $disabled{$proto} = "option(tls)";
                                 }
                         }
+                elsif ($1 eq "static-engine")
+                        {
+                        $disabled{"static-engine"} = "option";
+                        }
+                elsif ($1 eq "dynamic-engine")
+                        {
+                        delete $disabled{"static-engine"};
+                        }
                 else
                         {
                         $disabled{$1} = "option";
@@ -551,6 +563,14 @@ foreach (@argvcopy)
 		}
 	elsif (/^enable-(.+)$/)
 		{
+                if ($1 eq "static-engine")
+                        {
+                        delete $disabled{"static-engine"};
+                        }
+                elsif ($1 eq "dynamic-engine")
+                        {
+                        $disabled{"static-engine"} = "option";
+                        }
 		my $algo = $1;
 		delete $disabled{$algo};
 
@@ -983,29 +1003,14 @@ if ($target{shared_target} eq "")
 	$no_shared_warn = 1 if !$config{no_shared} && !$config{fips};
 	$config{no_shared} = 1;
 	}
-if (!$config{no_shared})
-	{
-	if ($target{shared_cflag} ne "")
-		{
-		push @{$config{defines}}, "OPENSSL_PIC";
-		$config{cflags} = "$target{shared_cflag} $config{cflags}";
-		}
-	}
 
-if ($builder ne "mk1mf")
-	{
-	# add {no-}static-engine to options to allow mkdef.pl to work without extra arguments
-	if ($config{no_shared})
-		{
-		push @{$config{openssl_other_defines}}, "OPENSSL_NO_DYNAMIC_ENGINE";
-		$config{options}.=" static-engine";
-		}
-	else
-		{
-		push @{$config{openssl_other_defines}}, "OPENSSL_NO_STATIC_ENGINE";
-		$config{options}.=" no-static-engine";
-		}
-	}
+if ($disabled{"static-engine"}) {
+        push @{$config{defines}}, "OPENSSL_NO_STATIC_ENGINE";
+        $config{dynamic_engines} = 1;
+} else {
+        push @{$config{defines}}, "OPENSSL_NO_DYNAMIC_ENGINE";
+        $config{dynamic_engines} = 0;
+}
 
 #
 # Platform fix-ups
@@ -1379,8 +1384,8 @@ if ($builder eq "unified") {
             $unified_info{libraries}->{$library} = 1;
         }
 
-        die <<"EOF" if $config{no_shared} && scalar @engines;
-ENGINES can only be used if configured with 'shared'.
+        die <<"EOF" if scalar @engines and !$config{dynamic_engines};
+ENGINES can only be used if configured with 'static-enginex'.
 This is usually a fault in a build.info file.
 EOF
         foreach (@engines) {
diff --git a/Makefile.in b/Makefile.in
index a7cd757..9cca221 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -194,6 +194,7 @@ LIBS=   libcrypto.a libssl.a
 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
 SHARED_SSL=libssl$(SHLIB_EXT)
 SHARED_LIBS={- '$(SHARED_CRYPTO) $(SHARED_SSL)' if (!$config{no_shared}) -}
+SHARED_CFLAG={- $target{shared_cflag} -}
 SHARED_LDFLAG={- $target{shared_ldflag}
                  # Unlike other OSes (like Solaris, Linux, Tru64,
                  # IRIX) BSD run-time linkers (tested OpenBSD, NetBSD
@@ -209,6 +210,7 @@ SHARED_LDFLAG={- $target{shared_ldflag}
                  . ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
                     ? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
 SHARED_RCFLAG={- $target{shared_rcflag} -}
+DYNAMIC_ENGINES={- $config{dynamic_engines} -}
 
 GENERAL=        Makefile
 BASENAME=       openssl
@@ -249,10 +251,11 @@ CLEARENV=	TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS}	\
 # same language for uniform treatment.
 BUILDENV=	LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
 		CC='$(CC)' CFLAG='$(CFLAG)' CFLAG_Q='$(CFLAG_Q)'	\
+		SHARED_CFLAG='$(SHARED_CFLAG)'				\
 		AS='$(CC)' ASFLAG='$(CFLAG) -c'			\
 		AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)'	\
-		CROSS_COMPILE='$(CROSS_COMPILE)'	\
-		PERL='$(PERL)'	\
+		CROSS_COMPILE='$(CROSS_COMPILE)'		\
+		PERL='$(PERL)' DYNAMIC_ENGINES='$(DYNAMIC_ENGINES)'	\
 		SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)'	\
 		DESTDIR='$(DESTDIR)'		\
 		INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)'	\
diff --git a/crypto/Makefile.in b/crypto/Makefile.in
index d04f75c..c8184e5 100644
--- a/crypto/Makefile.in
+++ b/crypto/Makefile.in
@@ -21,7 +21,7 @@ RECURSIVE_MAKE=	[ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
 PLIB_LDFLAG=
 EX_LIBS=
 
-CFLAGS= $(INCLUDE) $(CFLAG)
+CFLAGS= $(INCLUDE) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDE) $(ASFLAG)
 AFLAGS=$(ASFLAGS)
 CPUID_OBJ=mem_clr.o
diff --git a/crypto/aes/Makefile.in b/crypto/aes/Makefile.in
index 98bfb0a..938ad3c 100644
--- a/crypto/aes/Makefile.in
+++ b/crypto/aes/Makefile.in
@@ -13,7 +13,7 @@ AR=		ar r
 
 AES_ENC=aes_core.o aes_cbc.o
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/asn1/Makefile.in b/crypto/asn1/Makefile.in
index b6c44e7..86f805b 100644
--- a/crypto/asn1/Makefile.in
+++ b/crypto/asn1/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile README
 
diff --git a/crypto/async/Makefile.in b/crypto/async/Makefile.in
index 6e9f465..277aa9e 100644
--- a/crypto/async/Makefile.in
+++ b/crypto/async/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 TEST=
diff --git a/crypto/bf/Makefile.in b/crypto/bf/Makefile.in
index 14e2fe2..ee5c259 100644
--- a/crypto/bf/Makefile.in
+++ b/crypto/bf/Makefile.in
@@ -13,7 +13,7 @@ AR=		ar r
 
 BF_ENC=		bf_enc.o
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/bio/Makefile.in b/crypto/bio/Makefile.in
index ff35cfb..2bf8601 100644
--- a/crypto/bio/Makefile.in
+++ b/crypto/bio/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/bn/Makefile.in b/crypto/bn/Makefile.in
index 7574585..b14301a 100644
--- a/crypto/bn/Makefile.in
+++ b/crypto/bn/Makefile.in
@@ -13,7 +13,7 @@ AR=		ar r
 
 BN_ASM=		bn_asm.o
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/buffer/Makefile.in b/crypto/buffer/Makefile.in
index 79eeac1..09b3488 100644
--- a/crypto/buffer/Makefile.in
+++ b/crypto/buffer/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/camellia/Makefile.in b/crypto/camellia/Makefile.in
index ac3ffda..10c5a75 100644
--- a/crypto/camellia/Makefile.in
+++ b/crypto/camellia/Makefile.in
@@ -13,7 +13,7 @@ AR=		ar r
 
 CMLL_ENC= camellia.o cmll_misc.o cmll_cbc.o
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/cast/Makefile.in b/crypto/cast/Makefile.in
index cd62408..06f65e2 100644
--- a/crypto/cast/Makefile.in
+++ b/crypto/cast/Makefile.in
@@ -13,7 +13,7 @@ AR=		ar r
 
 CAST_ENC=c_enc.o
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/chacha/Makefile.in b/crypto/chacha/Makefile.in
index de80ba4..33e41d5 100644
--- a/crypto/chacha/Makefile.in
+++ b/crypto/chacha/Makefile.in
@@ -12,7 +12,7 @@ AR=		ar r
 
 CHACHA_ENC=chacha_enc.o
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/cmac/Makefile.in b/crypto/cmac/Makefile.in
index 4488865..5abc139 100644
--- a/crypto/cmac/Makefile.in
+++ b/crypto/cmac/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/cms/Makefile.in b/crypto/cms/Makefile.in
index 5e5db74..cf074ea 100644
--- a/crypto/cms/Makefile.in
+++ b/crypto/cms/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/comp/Makefile.in b/crypto/comp/Makefile.in
index 6db1349..24c1231 100644
--- a/crypto/comp/Makefile.in
+++ b/crypto/comp/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/conf/Makefile.in b/crypto/conf/Makefile.in
index c0c8cd8..e1bae36 100644
--- a/crypto/conf/Makefile.in
+++ b/crypto/conf/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/ct/Makefile.in b/crypto/ct/Makefile.in
index 5d186b8..100179d 100644
--- a/crypto/ct/Makefile.in
+++ b/crypto/ct/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/des/Makefile.in b/crypto/des/Makefile.in
index c65c05b..248b53d 100644
--- a/crypto/des/Makefile.in
+++ b/crypto/des/Makefile.in
@@ -13,7 +13,7 @@ AR=		ar r
 RANLIB=		ranlib
 DES_ENC=	des_enc.o fcrypt_b.o
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/dh/Makefile.in b/crypto/dh/Makefile.in
index 473ad35..9ac52eb 100644
--- a/crypto/dh/Makefile.in
+++ b/crypto/dh/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/dsa/Makefile.in b/crypto/dsa/Makefile.in
index dd5bdbe..a22dfa3 100644
--- a/crypto/dsa/Makefile.in
+++ b/crypto/dsa/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/dso/Makefile.in b/crypto/dso/Makefile.in
index 1f74735..58d0974 100644
--- a/crypto/dso/Makefile.in
+++ b/crypto/dso/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/ec/Makefile.in b/crypto/ec/Makefile.in
index eb68dcd..1aa22d4 100644
--- a/crypto/ec/Makefile.in
+++ b/crypto/ec/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/engine/Makefile.in b/crypto/engine/Makefile.in
index 01dad47..8435e75 100644
--- a/crypto/engine/Makefile.in
+++ b/crypto/engine/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/err/Makefile.in b/crypto/err/Makefile.in
index b2ff218..9329e91 100644
--- a/crypto/err/Makefile.in
+++ b/crypto/err/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/evp/Makefile.in b/crypto/evp/Makefile.in
index 100de31..5b24ae5 100644
--- a/crypto/evp/Makefile.in
+++ b/crypto/evp/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/hmac/Makefile.in b/crypto/hmac/Makefile.in
index ffb80b5..ab8acab 100644
--- a/crypto/hmac/Makefile.in
+++ b/crypto/hmac/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/idea/Makefile.in b/crypto/idea/Makefile.in
index c0f12e2..b3aafca 100644
--- a/crypto/idea/Makefile.in
+++ b/crypto/idea/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/kdf/Makefile.in b/crypto/kdf/Makefile.in
index f7ddfe0..be4e08c 100644
--- a/crypto/kdf/Makefile.in
+++ b/crypto/kdf/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/lhash/Makefile.in b/crypto/lhash/Makefile.in
index a9dc3df..ff90001 100644
--- a/crypto/lhash/Makefile.in
+++ b/crypto/lhash/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/md2/Makefile.in b/crypto/md2/Makefile.in
index 29eeb33..2692884 100644
--- a/crypto/md2/Makefile.in
+++ b/crypto/md2/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/md4/Makefile.in b/crypto/md4/Makefile.in
index ff5a2c1..b45b6ce 100644
--- a/crypto/md4/Makefile.in
+++ b/crypto/md4/Makefile.in
@@ -11,7 +11,7 @@ CFLAG=-g
 MAKEFILE=       Makefile
 AR=             ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/md5/Makefile.in b/crypto/md5/Makefile.in
index b1d98e1..aec94b6 100644
--- a/crypto/md5/Makefile.in
+++ b/crypto/md5/Makefile.in
@@ -13,7 +13,7 @@ AR=             ar r
 
 MD5_ASM_OBJ=
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/mdc2/Makefile.in b/crypto/mdc2/Makefile.in
index 8930d02..3c2275b 100644
--- a/crypto/mdc2/Makefile.in
+++ b/crypto/mdc2/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/modes/Makefile.in b/crypto/modes/Makefile.in
index 4d3c0b0..5e4415c 100644
--- a/crypto/modes/Makefile.in
+++ b/crypto/modes/Makefile.in
@@ -12,7 +12,7 @@ AR=		ar r
 
 MODES_ASM_OBJ=
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/objects/Makefile.in b/crypto/objects/Makefile.in
index 394da3b..64d138b 100644
--- a/crypto/objects/Makefile.in
+++ b/crypto/objects/Makefile.in
@@ -11,7 +11,7 @@ MAKEFILE=	Makefile
 AR=		ar r
 PERL=		perl
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile README
 
diff --git a/crypto/ocsp/Makefile.in b/crypto/ocsp/Makefile.in
index 26d9774..5ce7d88 100644
--- a/crypto/ocsp/Makefile.in
+++ b/crypto/ocsp/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile README
 
diff --git a/crypto/pem/Makefile.in b/crypto/pem/Makefile.in
index 8a23ef6..a522297 100644
--- a/crypto/pem/Makefile.in
+++ b/crypto/pem/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/pkcs12/Makefile.in b/crypto/pkcs12/Makefile.in
index 651f13f..165ca2d 100644
--- a/crypto/pkcs12/Makefile.in
+++ b/crypto/pkcs12/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/pkcs7/Makefile.in b/crypto/pkcs7/Makefile.in
index a58e323..49b78c5 100644
--- a/crypto/pkcs7/Makefile.in
+++ b/crypto/pkcs7/Makefile.in
@@ -13,7 +13,7 @@ AR=		ar r
 PLIB_LDFLAG=
 EX_LIBS=
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile README
 
diff --git a/crypto/poly1305/Makefile.in b/crypto/poly1305/Makefile.in
index 8735b79..10f009f 100644
--- a/crypto/poly1305/Makefile.in
+++ b/crypto/poly1305/Makefile.in
@@ -12,7 +12,7 @@ AR=		ar r
 
 POLY1305_ASM_OBJ=
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/rand/Makefile.in b/crypto/rand/Makefile.in
index bf9ff3e..8796faf 100644
--- a/crypto/rand/Makefile.in
+++ b/crypto/rand/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/rc2/Makefile.in b/crypto/rc2/Makefile.in
index 3eaf4e3..d124d0b 100644
--- a/crypto/rc2/Makefile.in
+++ b/crypto/rc2/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/rc4/Makefile.in b/crypto/rc4/Makefile.in
index f0f72d1..fe2ef7d 100644
--- a/crypto/rc4/Makefile.in
+++ b/crypto/rc4/Makefile.in
@@ -12,7 +12,7 @@ AR=		ar r
 
 RC4_ENC=rc4_enc.o rc4_skey.o
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/rc5/Makefile.in b/crypto/rc5/Makefile.in
index 9efe7f9..bd7a1c6 100644
--- a/crypto/rc5/Makefile.in
+++ b/crypto/rc5/Makefile.in
@@ -13,7 +13,7 @@ AR=		ar r
 
 RC5_ENC=		rc5_enc.o
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/ripemd/Makefile.in b/crypto/ripemd/Makefile.in
index 3aed997..8158a73 100644
--- a/crypto/ripemd/Makefile.in
+++ b/crypto/ripemd/Makefile.in
@@ -13,7 +13,7 @@ AR=             ar r
 
 RIP_ASM_OBJ=
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/rsa/Makefile.in b/crypto/rsa/Makefile.in
index 8779cc7..0e2e2bf 100644
--- a/crypto/rsa/Makefile.in
+++ b/crypto/rsa/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/seed/Makefile.in b/crypto/seed/Makefile.in
index a6c85af..fe55942 100644
--- a/crypto/seed/Makefile.in
+++ b/crypto/seed/Makefile.in
@@ -11,7 +11,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/sha/Makefile.in b/crypto/sha/Makefile.in
index 2675869..afb161b 100644
--- a/crypto/sha/Makefile.in
+++ b/crypto/sha/Makefile.in
@@ -13,7 +13,7 @@ AR=             ar r
 
 SHA1_ASM_OBJ=
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/srp/Makefile.in b/crypto/srp/Makefile.in
index 8b0c9c7..8aa422a 100644
--- a/crypto/srp/Makefile.in
+++ b/crypto/srp/Makefile.in
@@ -8,7 +8,7 @@ OPENSSLDIR=     /usr/local/ssl
 INSTALLTOP=/usr/local/ssl
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/stack/Makefile.in b/crypto/stack/Makefile.in
index 22630c2..fbce5a5 100644
--- a/crypto/stack/Makefile.in
+++ b/crypto/stack/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/ts/Makefile.in b/crypto/ts/Makefile.in
index f5d40b9..7f8648a 100644
--- a/crypto/ts/Makefile.in
+++ b/crypto/ts/Makefile.in
@@ -14,7 +14,7 @@ AR=		ar r
 PLIB_LDFLAG=
 EX_LIBS=
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL= Makefile
 
diff --git a/crypto/txt_db/Makefile.in b/crypto/txt_db/Makefile.in
index 3229d52..e3810fa 100644
--- a/crypto/txt_db/Makefile.in
+++ b/crypto/txt_db/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/ui/Makefile.in b/crypto/ui/Makefile.in
index c8f327a..46ae052 100644
--- a/crypto/ui/Makefile.in
+++ b/crypto/ui/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile
 
diff --git a/crypto/whrlpool/Makefile.in b/crypto/whrlpool/Makefile.in
index 6027883..a1be9fe 100644
--- a/crypto/whrlpool/Makefile.in
+++ b/crypto/whrlpool/Makefile.in
@@ -13,7 +13,7 @@ AR=		ar r
 
 WP_ASM_OBJ=wp_block.o
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
diff --git a/crypto/x509/Makefile.in b/crypto/x509/Makefile.in
index 440ff72..4932622 100644
--- a/crypto/x509/Makefile.in
+++ b/crypto/x509/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile README
 
diff --git a/crypto/x509v3/Makefile.in b/crypto/x509v3/Makefile.in
index 6dec02b..243d5c5 100644
--- a/crypto/x509v3/Makefile.in
+++ b/crypto/x509v3/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile README
 
diff --git a/engines/Makefile.in b/engines/Makefile.in
index 99ba822..d07cc0f 100644
--- a/engines/Makefile.in
+++ b/engines/Makefile.in
@@ -18,7 +18,7 @@ PADLOCK_ASM_OBJ=
 PLIB_LDFLAG=
 EX_LIBS=
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
@@ -57,7 +57,7 @@ top:
 all:	lib
 
 lib:	$(LIBOBJ) $(TESTLIBOBJ)
-	@if [ -n "$(SHARED_LIBS)" ]; then \
+	@if [ "$(DYNAMIC_ENGINES)" = 1 ]; then \
 		set -e; \
 		for l in $(LIBNAMES) $(TESTLIBNAMES); do \
 			$(MAKE) -f ../Makefile.shared -e \
diff --git a/engines/build.info b/engines/build.info
index cae4986..98f0e58 100644
--- a/engines/build.info
+++ b/engines/build.info
@@ -1,5 +1,5 @@
 {- use File::Spec::Functions qw/:DEFAULT rel2abs/; -}
-IF[{- $config{no_shared} -}]
+IF[{- !$config{dynamic_engines} -}]
  LIBS=../libcrypto
  SOURCE[../libcrypto]=\
         e_padlock.c {- $target{padlock_asm_src} -} \
diff --git a/ssl/Makefile.in b/ssl/Makefile.in
index e56ffa0..28c427c 100644
--- a/ssl/Makefile.in
+++ b/ssl/Makefile.in
@@ -10,7 +10,7 @@ CFLAG=-g
 MAKEFILE=	Makefile
 AR=		ar r
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 
 GENERAL=Makefile README ssl-lib.com install.com
 
diff --git a/test/recipes/70-test_sslcertstatus.t b/test/recipes/70-test_sslcertstatus.t
index 303de5e..9987e79 100755
--- a/test/recipes/70-test_sslcertstatus.t
+++ b/test/recipes/70-test_sslcertstatus.t
@@ -63,11 +63,8 @@ setup($test_name);
 plan skip_all => "TLSProxy isn't usable on $^O"
     if $^O =~ /^VMS$/;
 
-plan skip_all => "$test_name needs the engine feature enabled"
-    if disabled("engine");
-
-plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
-    if disabled("shared");
+plan skip_all => "$test_name needs the dynamic engine feature enabled"
+    if disabled("engine") || disabled("dynamic_engines");
 
 $ENV{OPENSSL_ENGINES} = bldtop_dir("engines");
 $ENV{OPENSSL_ia32cap} = '~0x200000200000000';
diff --git a/test/recipes/70-test_sslextension.t b/test/recipes/70-test_sslextension.t
index c253f74..6ad4130 100755
--- a/test/recipes/70-test_sslextension.t
+++ b/test/recipes/70-test_sslextension.t
@@ -63,11 +63,8 @@ setup($test_name);
 plan skip_all => "TLSProxy isn't usable on $^O"
     if $^O =~ /^VMS$/;
 
-plan skip_all => "$test_name needs the engine feature enabled"
-    if disabled("engine");
-
-plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
-    if disabled("shared");
+plan skip_all => "$test_name needs the dynamic engine feature enabled"
+    if disabled("engine") || disabled("dynamic_engines");
 
 $ENV{OPENSSL_ENGINES} = bldtop_dir("engines");
 $ENV{OPENSSL_ia32cap} = '~0x200000200000000';
diff --git a/test/recipes/70-test_sslsessiontick.t b/test/recipes/70-test_sslsessiontick.t
index 4e9c85f..cd6e483 100755
--- a/test/recipes/70-test_sslsessiontick.t
+++ b/test/recipes/70-test_sslsessiontick.t
@@ -64,11 +64,8 @@ setup($test_name);
 plan skip_all => "TLSProxy isn't usable on $^O"
     if $^O =~ /^VMS$/;
 
-plan skip_all => "$test_name needs the engine feature enabled"
-    if disabled("engine");
-
-plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
-    if disabled("shared");
+plan skip_all => "$test_name needs the dynamic engine feature enabled"
+    if disabled("engine") || disabled("dynamic_engines");
 
 $ENV{OPENSSL_ENGINES} = bldtop_dir("engines");
 $ENV{OPENSSL_ia32cap} = '~0x200000200000000';
diff --git a/test/recipes/70-test_sslskewith0p.t b/test/recipes/70-test_sslskewith0p.t
index fac1e8d..eaf37b6 100755
--- a/test/recipes/70-test_sslskewith0p.t
+++ b/test/recipes/70-test_sslskewith0p.t
@@ -63,11 +63,8 @@ setup($test_name);
 plan skip_all => "TLSProxy isn't usable on $^O"
     if $^O =~ /^VMS$/;
 
-plan skip_all => "$test_name needs the engine feature enabled"
-    if disabled("engine");
-
-plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
-    if disabled("shared");
+plan skip_all => "$test_name needs the dynamic engine feature enabled"
+    if disabled("engine") || disabled("dynamic_engines");
 
 plan skip_all => "dh is not supported by this OpenSSL build"
     if disabled("dh");
diff --git a/test/recipes/70-test_sslvertol.t b/test/recipes/70-test_sslvertol.t
index e014d3f..f89bc87 100755
--- a/test/recipes/70-test_sslvertol.t
+++ b/test/recipes/70-test_sslvertol.t
@@ -63,11 +63,8 @@ setup($test_name);
 plan skip_all => "TLSProxy isn't usable on $^O"
     if $^O =~ /^VMS$/;
 
-plan skip_all => "$test_name needs the engine feature enabled"
-    if disabled("engine");
-
-plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
-    if disabled("shared");
+plan skip_all => "$test_name needs the dynamic engine feature enabled"
+    if disabled("engine") || disabled("dynamic_engines");
 
 $ENV{OPENSSL_ENGINES} = bldtop_dir("engines");
 $ENV{OPENSSL_ia32cap} = '~0x200000200000000';
diff --git a/test/recipes/70-test_tlsextms.t b/test/recipes/70-test_tlsextms.t
index 022b3a8..27b5347 100644
--- a/test/recipes/70-test_tlsextms.t
+++ b/test/recipes/70-test_tlsextms.t
@@ -64,11 +64,8 @@ setup($test_name);
 plan skip_all => "TLSProxy isn't usable on $^O"
     if $^O =~ /^VMS$/;
 
-plan skip_all => "$test_name needs the engine feature enabled"
-    if disabled("engine");
-
-plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
-    if disabled("shared");
+plan skip_all => "$test_name needs the dynamic engine feature enabled"
+    if disabled("engine") || disabled("dynamic_engines");
 
 $ENV{OPENSSL_ENGINES} = bldtop_dir("engines");
 $ENV{OPENSSL_ia32cap} = '~0x200000200000000';
diff --git a/test/recipes/90-test_networking.t b/test/recipes/90-test_networking.t
index cf3b43a..5297be0 100644
--- a/test/recipes/90-test_networking.t
+++ b/test/recipes/90-test_networking.t
@@ -63,11 +63,8 @@ setup($test_name);
 plan skip_all => "TLSProxy isn't usable on $^O"
     if $^O =~ /^VMS$/;
 
-plan skip_all => "$test_name needs the engine feature enabled"
-    if disabled("engine");
-
-plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
-    if disabled("shared");
+plan skip_all => "$test_name needs the dynamic engine feature enabled"
+    if disabled("engine") || disabled("dynamic_engines");
 
 $ENV{OPENSSL_ENGINES} = bldtop_dir("engines");
 $ENV{OPENSSL_ia32cap} = '~0x200000200000000';
diff --git a/util/mk1mf.pl b/util/mk1mf.pl
index 41aa0ec..3e8967c 100755
--- a/util/mk1mf.pl
+++ b/util/mk1mf.pl
@@ -53,6 +53,7 @@ my %mf_import = (
 	CC             => \$mf_cc,
 	CFLAG	       => \$mf_cflag,
 	CFLAG_Q	       => \$mf_cflag_q,
+	SHARED_CFLAG   => \$mf_shared_cflag,
         DEPFLAG        => \$mf_depflag,
 	CPUID_OBJ      => \$mf_cpuid_asm,
 	BN_ASM	       => \$mf_bn_asm,
@@ -175,8 +176,6 @@ foreach (grep(!/^$/, split(/ /, $OPTIONS)))
 	print STDERR "unknown option - $_\n" if !&read_options;
 	}
 
-$no_static_engine = 0 if (!$shlib);
-
 $no_mdc2=1 if ($no_des);
 
 $no_ssl3=1 if ($no_md5);
@@ -309,7 +308,7 @@ $cflags.=" -DOPENSSL_FIPS"    if $fips;
 $cflags.=" -DOPENSSL_NO_EC2M"    if $no_ec2m;
 $cflags.= " -DZLIB" if $zlib_opt;
 $cflags.= " -DZLIB_SHARED" if $zlib_opt == 2;
-$cflags.=" -DOPENSSL_PIC" if $shlib;
+$cflags.=" -DOPENSSL_PIC";
 
 if ($no_static_engine)
 	{
@@ -328,7 +327,7 @@ else
 	{ $cflags="$c_flags$cflags" if ($c_flags ne ""); }
 
 if ($orig_platform eq 'copy') {
-    $cflags = $mf_cflag;
+    $cflags = "$mf_cflag $mf_shared_cflag";
     $cc = $mf_cc;
 }
 
@@ -1462,11 +1461,11 @@ sub read_options
 		{
 		$zlib_opt = 2;
 		}
-	elsif (/^no-static-engine/)
+	elsif (/^no-static-engine/ or /^enable-dynamic-engine/)
 		{
 		$no_static_engine = 1;
 		}
-	elsif (/^enable-static-engine/)
+	elsif (/^no-dynamic-engine/ or /^enable-static-engine/)
 		{
 		$no_static_engine = 0;
 		}
diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl
index 2c11184..03dee98 100644
--- a/util/pl/VC-32.pl
+++ b/util/pl/VC-32.pl
@@ -49,7 +49,7 @@ if ($FLAVOR =~ /WIN64/)
     # per 0.9.8 release remaining warnings were explicitly examined and
     # considered safe to ignore.
     # 
-    $base_cflags= " $mf_cflag";
+    $base_cflags= " $mf_cflag" . ($mf_shared_cflag ? " $mf_shared_cflag" : "");
     my $f = ($shlib and !$fipscanisterbuild)?' /MD':' /MT';
     $opt_cflags=$f.' /Ox';
     $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
@@ -138,7 +138,7 @@ elsif ($FLAVOR =~ /CE/)
     }
 else	# Win32
     {
-    $base_cflags= " $mf_cflag";
+    $base_cflags= " $mf_cflag" . ($mf_shared_cflag ? " $mf_shared_cflag" : "");
     my $f = ($shlib and !$fipscanisterbuild)?' /MD':' /MT';
     $opt_cflags=$f.' /Ox /O2 /Ob2';
     $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';


More information about the openssl-commits mailing list