Install OpenSSL 0.9.8r header files
[msysgit.git] / src / openssl / patches / 0004-openssl-build-DLL-directly.patch
blob14dc3e749f787a72b22db3a58ba89cfc0ecf42a1
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.
10 ---
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
17 --- a/ms/mingw32.bat
18 +++ b/ms/mingw32.bat
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
31 :end
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
40 -$mklib='ar r';
41 +$mklib='gcc -shared -o';
42 $mlflags='';
43 $ranlib='ranlib';
44 $plib='lib';
45 -$libp=".a";
46 -$shlibp=".a";
47 +$libp=".dll";
48 +$shlibp=".dll";
49 $lfile='';
51 $asm='as';
52 @@ -86,10 +86,15 @@ sub do_lib_rule
53 $target="$target";
54 ($Name=$name) =~ tr/a-z/A-Z/;
56 + my $ex = "";
57 + if ($target =~ /O_SSL/)
58 + {
59 + $ex .= " \$(L_CRYPTO)";
60 + }
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";
69 sub do_link_rule
70 --
71 1.6.3.msysgit.0.96.g65deb