[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Thu Feb 11 15:50:31 UTC 2016


The branch master has been updated
       via  64c443e3f0057946ddd8f37a36821a7f9c0e0493 (commit)
       via  68ab559a50e1819fa441183b81e4523ed1d949e7 (commit)
      from  e737d7b197e153775735f700cd6c31cb55d803de (commit)


- Log -----------------------------------------------------------------
commit 64c443e3f0057946ddd8f37a36821a7f9c0e0493
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Feb 5 15:17:33 2016 +0100

    Add support for shared_rcflag, useful for windres (Cygwin and Mingw)
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit 68ab559a50e1819fa441183b81e4523ed1d949e7
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Feb 5 15:14:45 2016 +0100

    Modernise the mingw cflags and ldflags
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

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

Summary of changes:
 Configurations/00-base-templates.conf |  1 +
 Configurations/10-main.conf           | 10 ++++++----
 Configure                             |  7 ++++---
 Makefile.in                           |  2 ++
 Makefile.shared                       |  6 +++++-
 5 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf
index 1771e3d..9d405ef 100644
--- a/Configurations/00-base-templates.conf
+++ b/Configurations/00-base-templates.conf
@@ -35,6 +35,7 @@
 	shared_target	=> "",
 	shared_cflag	=> "",
 	shared_ldflag	=> "",
+	shared_rcflag	=> "",
 	shared_extension	=> "",
 	build_scheme	=> "unixmake",
 	build_file      => "Makefile",
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 28322e3..07e1d6a 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1162,7 +1162,7 @@
     "mingw" => {
         inherit_from     => [ asm("x86_asm") ],
         cc               => "gcc",
-        cflags           => "-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -march=i486 -Wall",
+        cflags           => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
         debug_cflags     => "-g -O0",
         release_cflags   => "-O3 -fomit-frame-pointer",
         thread_cflag     => "-D_MT",
@@ -1173,7 +1173,8 @@
         dso_scheme       => "win32",
         shared_target    => "cygwin-shared",
         shared_cflag     => "-D_WINDLL -DOPENSSL_USE_APPLINK",
-        shared_ldflag    => "-mno-cygwin",
+        shared_ldflag    => "-static-libgcc",
+        shared_rcflag    => "--target=pe-i386",
         shared_extension => ".dll",
     },
     "mingw64" => {
@@ -1187,7 +1188,7 @@
         # Applink is never engaged and can as well be omitted.
         inherit_from     => [ asm("x86_64_asm") ],
         cc               => "gcc",
-        cflags           => "-mno-cygwin -DL_ENDIAN -Wall -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE",
+        cflags           => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall",
         debug_cflags     => "-g -O0",
         release_cflags   => "-O3",
         thread_cflag     => "-D_MT",
@@ -1198,7 +1199,8 @@
         dso_scheme       => "win32",
         shared_target    => "cygwin-shared",
         shared_cflag     => "-D_WINDLL",
-        shared_ldflag    => "-mno-cygwin",
+        shared_ldflag    => "-static-libgcc",
+        shared_rcflag    => "--target=pe-x86-64",
         shared_extension => ".dll",
     },
 
diff --git a/Configure b/Configure
index f617df5..d3800cb 100755
--- a/Configure
+++ b/Configure
@@ -870,10 +870,10 @@ push @{$config{defines}},
     map { (my $x = $_) =~ s/^OPENSSL_NO_/OPENSSL_EXPERIMENTAL_/; $x }
         @{$config{openssl_experimental_defines}};
 
-if ($target =~ /^mingw/ && `$target{cc} --target-help 2>&1` !~ m/-mno-cygwin/m)
+if ($target =~ /^mingw/ && `$target{cc} --target-help 2>&1` =~ m/-mno-cygwin/m)
 	{
-	$config{cflags} =~ s/-mno-cygwin\s*//;
-	$target{shared_ldflag} =~ s/-mno-cygwin\s*//;
+	$config{cflags} .= " -mno-cygwin";
+	$target{shared_ldflag} .= " -mno-cygwin";
 	}
 
 if ($target =~ /linux.*-mips/ && !$no_asm && $user_cflags !~ /-m(ips|arch=)/) {
@@ -2180,6 +2180,7 @@ sub print_table_entry
 	"shared_target",
 	"shared_cflag",
 	"shared_ldflag",
+	"shared_rcflag",
 	"shared_extension",
 	"obj_extension",
 	"exe_extension",
diff --git a/Makefile.in b/Makefile.in
index a1c3252..b788042 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -205,6 +205,7 @@ SHARED_LDFLAG={- $target{shared_ldflag}
                  # $prefix is not /usr.
                  . ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
                     ? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
+SHARED_RCFLAG={- $target{shared_rcflag} -}
 
 GENERAL=        Makefile
 BASENAME=       openssl
@@ -255,6 +256,7 @@ BUILDENV=	LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
 		LIBDIR='$(LIBDIR)'				\
 		DEPFLAG='$(DEPFLAG)'                    	\
 		SHARED_LDFLAG='$(SHARED_LDFLAG)'		\
+		SHARED_RCFLAG='$(SHARED_RCFLAG)'		\
 		ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)'	\
 		EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)'	\
 		SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)'	\
diff --git a/Makefile.shared b/Makefile.shared
index a474f16..29e1808 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -14,6 +14,10 @@ CFLAGS=$(CFLAG)
 LDFLAGS=$(LDFLAG)
 SHARED_LDFLAGS=$(SHARED_LDFLAG)
 
+# SHARED_RCFLAGS are flags used with windres, i.e. when build for Cygwin
+# or Mingw.
+SHARED_RCFLAGS=$(SHARED_RCFLAG)
+
 NM=nm
 
 # LIBNAME contains just the name of the library, without prefix ("lib"
@@ -305,7 +309,7 @@ link_a.cygwin:
 	fi; \
 	dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
 	$(PERL) util/mkrc.pl $$dll_name | \
-		$(CROSS_COMPILE)windres -o rc.o; \
+		$(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o; \
 	extras="$$extras rc.o"; \
 	ALLSYMSFLAGS='-Wl,--whole-archive'; \
 	NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \


More information about the openssl-commits mailing list