summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-07 11:51:50 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-08-19 01:48:17 +0200
commit985f13a426bd2ebe0907e30c969e2fa3c8dcec45 (patch)
tree6831054e4d8346f12b53e9c2b6c747ff56a71387
parent0208d843f7c6238e0bbd88df6e5ea33ecc6b2a1f (diff)
upgrade to openssl-1.0.2a
and de-ifdef-per-platform the patch makefile so an upgrade attempt on one platform tests the patchs applying on all platforms ubsan.patch.0 was effectively applied upstream while need to add http://rt.openssl.org/Ticket/Display.html?id=3650 to build under windows Change-Id: Ieffd9bc3dd861a94a083d8b6b8d4117bba7f527c Reviewed-on: https://gerrit.libreoffice.org/15183 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--external/openssl/UnpackedTarball_openssl.mk34
-rw-r--r--external/openssl/openssl-1.0.1g-msvc2012-winxp.patch.120
-rw-r--r--external/openssl/openssl-3650-masm.patch.135
-rw-r--r--external/openssl/opensslmingw.patch109
-rw-r--r--external/openssl/opensslsol.patch68
-rw-r--r--external/openssl/opensslwnt.patch64
6 files changed, 107 insertions, 223 deletions
diff --git a/external/openssl/UnpackedTarball_openssl.mk b/external/openssl/UnpackedTarball_openssl.mk
index 5517688c7b6c..d1b353115249 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -22,33 +22,13 @@ $(eval $(call gb_UnpackedTarball_set_pre_action,openssl,\
endif
$(eval $(call gb_UnpackedTarball_add_patches,openssl,\
- external/openssl/CVE-2013-6449.patch \
- external/openssl/CVE-2013-6450.patch \
- external/openssl/CVE-2013-4353.patch \
- external/openssl/CVE-2014-0160.patch \
- external/openssl/CVE-2010-5298.patch \
- external/openssl/CVE-2014-0195.patch \
- external/openssl/CVE-2014-0198.patch \
- external/openssl/CVE-2014-0221.patch \
- external/openssl/CVE-2014-0224.patch \
- external/openssl/CVE-2014-3470.patch \
- external/openssl/CVE-2014-3505.patch \
- external/openssl/CVE-2014-3506.patch \
- external/openssl/CVE-2014-3507.patch \
- external/openssl/CVE-2014-3508.patch \
- external/openssl/CVE-2014-3509.patch \
- external/openssl/CVE-2014-3510.patch \
- external/openssl/CVE-2014-3511.patch \
- external/openssl/CVE-2014-3513.patch \
- external/openssl/CVE-2014-3567.patch \
- external/openssl/CVE-2014-3566.patch \
- $(if $(filter LINUX FREEBSD ANDROID,$(OS)),external/openssl/openssllnx.patch) \
- $(if $(filter WNTGCC,$(OS)$(COM)),external/openssl/opensslmingw.patch) \
- $(if $(filter MSC,$(COM)),external/openssl/opensslwnt.patch) \
- $(if $(filter MSC,$(COM)),external/openssl/openssl-1.0.1g-msvc2012-winxp.patch.1) \
- $(if $(filter MSC,$(COM)),external/openssl/openssl-1.0.1h-win64.patch.1) \
- $(if $(filter SOLARIS,$(OS)),external/openssl/opensslsol.patch) \
- $(if $(filter IOS,$(OS)),external/openssl/opensslios.patch) \
+ external/openssl/openssllnx.patch \
+ external/openssl/opensslwnt.patch \
+ external/openssl/openssl-1.0.1g-msvc2012-winxp.patch.1 \
+ external/openssl/openssl-1.0.1h-win64.patch.1 \
+ external/openssl/opensslsol.patch \
+ external/openssl/opensslios.patch \
+ external/openssl/openssl-3650-masm.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/openssl/openssl-1.0.1g-msvc2012-winxp.patch.1 b/external/openssl/openssl-1.0.1g-msvc2012-winxp.patch.1
new file mode 100644
index 000000000000..de9e6fc09f4a
--- /dev/null
+++ b/external/openssl/openssl-1.0.1g-msvc2012-winxp.patch.1
@@ -0,0 +1,20 @@
+--- openssl.org/util/pl/VC-32.pl 2014-05-18 23:41:39.336594400 +0200
++++ openssl/util/pl/VC-32.pl 2014-05-18 23:47:40.055279300 +0200
+@@ -48,7 +48,7 @@
+ my $f = $shlib || $fips ?' /MD':' /MT';
+ $opt_cflags=$f.' /Ox';
+ $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
+- $lflags="/nologo /subsystem:console /opt:ref";
++ $lflags="/nologo /subsystem:console,5.02 /opt:ref";
+
+ *::perlasm_compile_target = sub {
+ my ($target,$source,$bname)=@_;
+@@ -135,7 +135,7 @@
+ $ff = "/fixed";
+ $opt_cflags=$f.' -Ox -O2 -Ob2';
+ $dbg_cflags=$f.'d -Od -DDEBUG -D_DEBUG';
+- $lflags="/nologo /subsystem:console /opt:ref";
++ $lflags="/nologo /subsystem:console,5.01 /opt:ref";
+ }
+ $lib_cflag='-Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
+ $mlflags='';
diff --git a/external/openssl/openssl-3650-masm.patch.1 b/external/openssl/openssl-3650-masm.patch.1
new file mode 100644
index 000000000000..97f1eb6446c3
--- /dev/null
+++ b/external/openssl/openssl-3650-masm.patch.1
@@ -0,0 +1,35 @@
+diff --git a/crypto/perlasm/x86masm.pl b/crypto/perlasm/x86masm.pl
+index 1741342..917d0f8 100644
+--- a/crypto/perlasm/x86masm.pl
++++ b/crypto/perlasm/x86masm.pl
+@@ -18,10 +18,10 @@ sub ::generic
+
+ if ($opcode =~ /lea/ && @arg[1] =~ s/.*PTR\s+(\(.*\))$/OFFSET $1/) # no []
+ { $opcode="mov"; }
+- elsif ($opcode !~ /movq/)
++ elsif ($opcode !~ /mov[dq]$/)
+ { # fix xmm references
+- $arg[0] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[1]=~/\bxmm[0-7]\b/i);
+- $arg[1] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[0]=~/\bxmm[0-7]\b/i);
++ $arg[0] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[-1]=~/\bxmm[0-7]\b/i);
++ $arg[-1] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[0]=~/\bxmm[0-7]\b/i);
+ }
+
+ &::emit($opcode,@arg);
+@@ -160,13 +160,13 @@ sub ::public_label
+ { push(@out,"PUBLIC\t".&::LABEL($_[0],$nmdecor.$_[0])."\n"); }
+
+ sub ::data_byte
+-{ push(@out,("DB\t").join(',',@_)."\n"); }
++{ push(@out,("DB\t").join(',',splice(@_,0,16))."\n") while(@_); }
+
+ sub ::data_short
+-{ push(@out,("DW\t").join(',',@_)."\n"); }
++{ push(@out,("DW\t").join(',',splice(@_,0,8))."\n") while(@_); }
+
+ sub ::data_word
+-{ push(@out,("DD\t").join(',',@_)."\n"); }
++{ push(@out,("DD\t").join(',',splice(@_,0,4))."\n") while(@_); }
+
+ sub ::align
+ { push(@out,"ALIGN\t$_[0]\n"); }
diff --git a/external/openssl/opensslmingw.patch b/external/openssl/opensslmingw.patch
deleted file mode 100644
index e0dc96029d6b..000000000000
--- a/external/openssl/opensslmingw.patch
+++ /dev/null
@@ -1,109 +0,0 @@
---- misc/openssl-0.9.8v/Makefile.shared 2008-09-17 17:56:40.000000000 +0200
-+++ misc/build/openssl-0.9.8v/Makefile.shared 2009-03-30 11:52:53.684538000 +0200
-@@ -254,13 +254,17 @@
- base=-Wl,--enable-auto-image-base; \
- if expr $(PLATFORM) : 'mingw' > /dev/null; then \
- SHLIB=$(LIBNAME)eay32; \
-- base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
-+ base=; \
-+ if test $(LIBNAME) = "crypto"; then \
-+ SHLIB=libeay32; \
-+ base=-Wl,--image-base,0x63000000; \
-+ fi; \
- fi; \
- SHLIB_SUFFIX=.dll; \
-- SHLIB_SOVER=-$(LIBVERSION); \
-+ SHLIB_SOVER=; \
- ALLSYMSFLAGS='-Wl,--whole-archive'; \
- NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
-- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
-+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--export-all-symbols -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
- [ -f apps/$$SHLIB$$SHLIB_SUFFIX ] && rm apps/$$SHLIB$$SHLIB_SUFFIX; \
- [ -f test/$$SHLIB$$SHLIB_SUFFIX ] && rm test/$$SHLIB$$SHLIB_SUFFIX; \
- $(LINK_SO_A) || exit 1; \
---- misc/openssl-0.9.8v/e_os2.h 2005-12-19 03:57:07.000000000 +0900
-+++ misc/build/openssl-0.9.8v/e_os2.h 2009-04-04 23:07:15.324250000 +0900
-@@ -264,7 +264,7 @@
- # define OPENSSL_IMPLEMENT_GLOBAL(type,name) \
- extern type _hide_##name; \
- type *_shadow_##name(void) { return &_hide_##name; } \
-- static type _hide_##name
-+ type _hide_##name
- # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)
- # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))
- #else
---- misc/openssl-0.9.8v/ms/mingw32.bat 2006-05-05 15:19:32.000000000 +0200
-+++ misc/build/openssl-0.9.8v/ms/mingw32.bat 2009-03-30 11:54:10.000000000 +0200
-@@ -79,15 +79,41 @@
- rem copy ms\tlhelp32.h outinc
-
- echo Building the libraries
--mingw32-make -f ms/mingw32a.mak
-+make -f ms/mingw32a.mak
- if errorlevel 1 goto end
-
- echo Generating the DLLs and input libraries
--dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lwsock32 -lgdi32
-+mv out/libcrypto.a out/libcrypto_static.a
-+mv out/libssl.a out/libssl_static.a
-+dlltool --dllname libeay32.dll --output-lib out/libcrypto.a --input-def ms/libeay32.def
- if errorlevel 1 goto end
--dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a
-+gcc --shared --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lwsock32 -lgdi32
- if errorlevel 1 goto end
-+dlltool --dllname ssleay32.dll --output-lib out/libssl.a --input-def ms/ssleay32.def
-+if errorlevel 1 goto end
-+if "%MINGW_SHARED_GXXLIB%"=="YES" goto shared_gxxlib
-+if "%MINGW_SHARED_GCCLIB%"=="YES" goto shared_gcclib
-+gcc --shared --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lwsock32 -lgdi32
-+if errorlevel 1 goto end
-+gcc --shared --enable-pseudo-reloc -Wl,-Map,out/ssleay32.map -Lout ms/ssleay32.def -o out/ssleay32.dll out/libssl_static.a -lcrypto
-+if errorlevel 1 goto end
-+goto finished
-+
-+:shared_gcclib
-+gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lwsock32 -lgdi32
-+if errorlevel 1 goto end
-+gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/ssleay32.map -Lout ms/ssleay32.def -o out/ssleay32.dll out/libssl_static.a -lcrypto
-+if errorlevel 1 goto end
-+goto finished
-+
-+:shared_gxxlib
-+gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lwsock32 -lgdi32 %MINGW_SHARED_LIBSTDSPP%
-+if errorlevel 1 goto end
-+gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/ssleay32.map -Lout ms/ssleay32.def -o out/ssleay32.dll out/libssl_static.a -lcrypto %MINGW_SHARED_LIBSTDSPP%
-+if errorlevel 1 goto end
-+goto finished
-
-+:finished
- echo Done compiling OpenSSL
-
- :end
---- misc/openssl-0.9.8v/util/pl/Mingw32.pl 2006-05-05 15:19:34.000000000 +0200
-+++ misc/build/openssl-0.9.8v/util/pl/Mingw32.pl 2009-03-30 11:55:04.000000000 +0200
-@@ -6,11 +6,11 @@
- $o='/';
- $cp='cp';
- $rm='rm -f';
--$mkdir='gmkdir';
-+#$mkdir='gmkdir';
-
--$o='\\';
--$cp='copy';
--$rm='del';
-+#$o='\\';
-+#$cp='copy';
-+#$rm='del';
- $mkdir='mkdir';
-
- # C compiler stuff
-@@ -87,7 +87,8 @@
- ($Name=$name) =~ tr/a-z/A-Z/;
-
- $ret.="$target: \$(${Name}OBJ)\n";
-- $ret.="\tif exist $target \$(RM) $target\n";
-+ $ret.="\t\$(RM) $target\n";
-+# $ret.="\tif exist $target \$(RM) $target\n";
- $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
- $ret.="\t\$(RANLIB) $target\n\n";
- }
diff --git a/external/openssl/opensslsol.patch b/external/openssl/opensslsol.patch
index a22dc05cee39..ef70130aab9b 100644
--- a/external/openssl/opensslsol.patch
+++ b/external/openssl/opensslsol.patch
@@ -1,81 +1,33 @@
--- misc/openssl-0.9.8v/Configure Mon Nov 9 15:14:26 2009
+++ build/openssl-0.9.8v/Configure Fri Mar 26 16:01:32 2010
-@@ -212,8 +212,8 @@
- "solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+@@ -228,8 +228,8 @@
+ "solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64",
#### Solaris x86 with Sun C setups
--"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
--"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"solaris-x86-cc","cc:-O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"solaris64-x86_64-cc","cc:-xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+-"solaris-x86-cc","cc:-fast -xarch=generic -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+-"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64",
++"solaris-x86-cc","cc:-xarch=generic -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"solaris64-x86_64-cc","cc:-xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64",
#### SPARC Solaris with GNU C setups
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
--- misc/openssl-0.9.8v/Makefile.shared Wed Sep 17 17:56:40 2008
+++ build/openssl-0.9.8v/Makefile.shared Fri Mar 26 16:04:41 2010
-@@ -93,7 +93,7 @@
+@@ -95,7 +95,7 @@
LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
- LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
+ LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
+ LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \
$${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS} )
LINK_SO= \
-@@ -103,7 +103,7 @@
+@@ -105,7 +105,7 @@
SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
- LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
+ LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
+ LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \
$${SHAREDCMD} $${SHAREDFLAGS} \
-o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
$$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
---- misc/openssl-0.9.8v/config Tue Mar 9 18:08:24 2010
-+++ build/openssl-0.9.8v/config Fri Mar 26 16:07:55 2010
-@@ -399,28 +399,25 @@
- # this is where the translation occurs into SSLeay terms
- # ---------------------------------------------------------------------------
-
--GCCVER=`(gcc -dumpversion) 2>/dev/null`
--if [ "$GCCVER" != "" ]; then
-- # then strip off whatever prefix egcs prepends the number with...
-- # Hopefully, this will work for any future prefixes as well.
-- GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'`
-- # Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion
-- # does give us what we want though, so we use that. We just just the
-- # major and minor version numbers.
-- # peak single digit before and after first dot, e.g. 2.95.1 gives 29
-- GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
-+if [ -z "$CC" ];then
-+ GCCVER=`(gcc -dumpversion) 2>/dev/null`
-+ if [ "$GCCVER" != "" ]; then
-+ CC=gcc
-+ # then strip off whatever prefix egcs prepends the number with...
-+ # Hopefully, this will work for any future prefixes as well.
-+ GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'`
-+ # Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion
-+ # does give us what we want though, so we use that. We just just the
-+ # major and minor version numbers.
-+ # peak single digit before and after first dot, e.g. 2.95.1 gives 29
-+ GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
-+ else
-+ CC=cc
-+ fi
-+else
-+ CC=`echo $CC | sed 's/^[^ ]*\/\(..\).*/\1/'`
- fi
-
--# Only set CC if not supplied already
--if [ -z "$CC" ]; then
--# figure out if gcc is available and if so we use it otherwise
--# we fallback to whatever cc does on the system
-- if [ "$GCCVER" != "" ]; then
-- CC=gcc
-- else
-- CC=cc
-- fi
--fi
- GCCVER=${GCCVER:-0}
- if [ "$SYSTEM" = "HP-UX" ];then
- # By default gcc is a ILP32 compiler (with long long == 64).
diff --git a/external/openssl/opensslwnt.patch b/external/openssl/opensslwnt.patch
index 5be9c958a37a..e033d25f602f 100644
--- a/external/openssl/opensslwnt.patch
+++ b/external/openssl/opensslwnt.patch
@@ -1,8 +1,8 @@
--- misc/openssl-0.9.8v/crypto/x509v3/v3_pci.c 2007-03-05 01:06:47.000000000 +0100
+++ build/openssl-0.9.8v/crypto/x509v3/v3_pci.c 2010-03-26 12:04:20.961547300 +0100
-@@ -2,7 +2,7 @@
- /* Contributed to the OpenSSL Project 2004
- * by Richard Levitte (richard@levitte.org)
+@@ -3,7 +3,7 @@
+ * Contributed to the OpenSSL Project 2004 by Richard Levitte
+ * (richard@levitte.org)
*/
-/* Copyright (c) 2004 Kungliga Tekniska Högskolan
+/* Copyright (c) 2004 Kungliga Tekniska Hoegskolan
@@ -11,9 +11,9 @@
*
--- misc/openssl-0.9.8v/crypto/x509v3/v3_pcia.c 2004-12-28 01:21:33.000000000 +0100
+++ build/openssl-0.9.8v/crypto/x509v3/v3_pcia.c 2010-03-26 12:04:20.961547300 +0100
-@@ -2,7 +2,7 @@
- /* Contributed to the OpenSSL Project 2004
- * by Richard Levitte (richard@levitte.org)
+@@ -3,7 +3,7 @@
+ * Contributed to the OpenSSL Project 2004 by Richard Levitte
+ * (richard@levitte.org)
*/
-/* Copyright (c) 2004 Kungliga Tekniska Högskolan
+/* Copyright (c) 2004 Kungliga Tekniska Hoegskolan
@@ -45,7 +45,7 @@
+%1 util\mkdef.pl 32 ssleay > ms\ssleay32.def
--- misc/openssl-0.9.8v/util/mk1mf.pl 2009-09-20 14:46:42.000000000 +0200
+++ build/openssl-0.9.8v/util/mk1mf.pl 2010-03-26 12:04:20.977172300 +0100
-@@ -128,7 +128,7 @@
+@@ -163,7 +163,7 @@
$inc_def="outinc";
$tmp_def="tmp";
@@ -54,7 +54,7 @@
$mkdir="-mkdir" unless defined $mkdir;
($ssl,$crypto)=("ssl","crypto");
-@@ -290,6 +290,11 @@
+@@ -343,6 +343,11 @@
chop;
($key,$val)=/^([^=]+)=(.*)/;
@@ -66,7 +66,7 @@
if ($key eq "RELATIVE_DIRECTORY")
{
if ($lib ne "")
-@@ -529,7 +529,7 @@
+@@ -469,7 +474,7 @@
# Set your compiler options
PLATFORM=$platform
CC=$bin_dir${cc}
@@ -75,27 +75,27 @@
APP_CFLAG=$app_cflag
LIB_CFLAG=$lib_cflag
SHLIB_CFLAG=$shl_cflag
-@@ -544,7 +544,7 @@
+@@ -484,7 +489,7 @@
LINK=$link
LFLAGS=$lflags
-RSC=$rsc
+RSC=$rsc \$(SOLARINC)
- # The output directory for everything intersting
+ # The output directory for everything interesting
OUT_D=$out_dir
-@@ -730,7 +735,7 @@
+@@ -665,7 +670,7 @@
printf OUT <<EOF;
#ifdef $platform_cpp_symbol
/* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */
-- #define CFLAGS "$cc $cflags"
-+ #define CFLAGS "$cflags"
+- #define CFLAGS "compiler: $cc $cflags"
++ #define CFLAGS "compiler: $cflags"
#define PLATFORM "$platform"
EOF
printf OUT " #define DATE \"%s\"\n", scalar gmtime();
--- misc/openssl-0.9.8v/util/pl/VC-32.pl 2010-02-04 02:10:24.000000000 +0100
+++ build/openssl-0.9.8v/util/pl/VC-32.pl 2010-03-26 12:04:20.977172300 +0100
-@@ -32,7 +32,7 @@
+@@ -30,7 +30,7 @@
my $ff = "";
# C compiler stuff
@@ -104,29 +104,31 @@
if ($FLAVOR =~ /WIN64/)
{
# Note that we currently don't have /WX on Win64! There is a lot of
-@@ -103,22 +103,22 @@
+@@ -114,7 +114,7 @@
}
- $cc='$(CC)';
+ $cc=($ENV{CC} or "cl");
- $base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
+ $base_cflags=' -W3 -GF -Gy -nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
$base_cflags.=" $wcecdefs";
$base_cflags.=' -I$(WCECOMPAT)/include' if (defined($ENV{'WCECOMPAT'}));
$base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if (defined($ENV{'PORTSDK_LIBPATH'}));
-- $opt_cflags=' /MC /O1i'; # optimize for space, but with intrinsics...
-- $dbg_cflags=' /MC /Od -DDEBUG -D_DEBUG';
-+ $opt_cflags=' -MC -O1i'; # optimize for space, but with intrinsics...
-+ $dbg_cflags=' -MC -Od -DDEBUG -D_DEBUG';
+@@ -123,20 +123,21 @@
+ } else {
+ $base_cflags.=' /MC';
+ }
+- $opt_cflags=' /O1i'; # optimize for space, but with intrinsics...
+- $dbg_cflags=' /Od -DDEBUG -D_DEBUG';
++ $opt_cflags=' -O1i'; # optimize for space, but with intrinsics...
++ $dbg_cflags=' -Od -DDEBUG -D_DEBUG';
++
$lflags="/nologo /opt:ref $wcelflag";
}
else # Win32
{
-- $base_cflags= " $mf_cflag";
-+ $base_cflags= " $mf_cflag";
+ $base_cflags= " $mf_cflag";
- my $f = $shlib || $fips ?' /MD':' /MT';
-- $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
+ my $f = $shlib || $fips ? (($ENV{MSVC_USE_DEBUG_RUNTIME} eq "TRUE") ? ' -MDd' : ' -MD' ):' -MT';
-+ $lib_cflag='-Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
$ff = "/fixed";
- $opt_cflags=$f.' /Ox /O2 /Ob2';
- $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
@@ -134,8 +136,12 @@
+ $dbg_cflags=$f.'d -Od -DDEBUG -D_DEBUG';
$lflags="/nologo /subsystem:console /opt:ref";
}
+-$lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
++$lib_cflag='-Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
$mlflags='';
-@@ -138,7 +138,7 @@
+
+ $out_def ="out32"; $out_def.="dll" if ($shlib);
+@@ -161,7 +162,7 @@
$obj='.obj';
$asm_suffix='.asm';
@@ -148,8 +154,8 @@
+++ build/openssl-0.9.8v/ms/uplink.c
@@ -1,5 +1,6 @@
#if (defined(_WIN64) || defined(_WIN32_WCE)) && !defined(UNICODE)
- #define UNICODE
-+#define _CRT_NON_CONFORMING_SWPRINTFS
+ # define UNICODE
++# define _CRT_NON_CONFORMING_SWPRINTFS
#endif
#if defined(UNICODE) && !defined(_UNICODE)
- #define _UNICODE
+ # define _UNICODE