1 From 7c70a253a8fc37ac4d34aef0c995a88f8ea82025 Mon Sep 17 00:00:00 2001
2 From: Erik Faye-Lund <kusmabite@gmail.com>
3 Date: Sun, 19 Jul 2009 23:57:36 +0200
4 Subject: [PATCH] openssl: build DLL directly
6 The mingw build system for OpenSSL links openssl.exe statically with
7 the OpenSSL libraries. This increases the size of the msysgit distribution,
8 and it would thus be better to only build the library as a DLL. This patch
9 uses "gcc -shared" instead of dllwrap to build the DLL directly.
11 ms/mingw32.bat | 6 ------
12 util/pl/Mingw32.pl | 15 ++++++++++-----
13 2 files changed, 10 insertions(+), 11 deletions(-)
15 diff --git a/ms/mingw32.bat b/ms/mingw32.bat
16 index f85305e..6ea371b 100644
19 @@ -82,12 +82,6 @@ echo Building the libraries
20 mingw32-make -f ms/mingw32a.mak SHELL=cmd
21 if errorlevel 1 goto end
23 -echo Generating the DLLs and input libraries
24 -dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lwsock32 -lgdi32
25 -if errorlevel 1 goto end
26 -dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a
27 -if errorlevel 1 goto end
29 echo Done compiling OpenSSL
32 diff --git a/util/pl/Mingw32.pl b/util/pl/Mingw32.pl
33 index 8f0483f..87c2ccc 100644
34 --- a/util/pl/Mingw32.pl
35 +++ b/util/pl/Mingw32.pl
36 @@ -60,12 +60,12 @@ $exep='';
37 $ex_libs="-lwsock32 -lgdi32";
39 # static library stuff
41 +$mklib='gcc -shared -o';
52 @@ -86,10 +86,15 @@ sub do_lib_rule
54 ($Name=$name) =~ tr/a-z/A-Z/;
57 + if ($target =~ /O_SSL/)
59 + $ex .= " \$(L_CRYPTO)";
62 $ret.="$target: \$(${Name}OBJ)\n";
63 $ret.="\tif exist $target \$(RM) $target\n";
64 - $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
65 - $ret.="\t\$(RANLIB) $target\n\n";
66 + $ret.="\t\$(MKLIB) $target \$(${Name}OBJ) \$(EX_LIBS) $ex\n\n";
71 1.6.3.msysgit.0.96.g65deb