Files
loongoffice/external/openssl/opensslwnt.patch
Caolán McNamara 01798050c1 upgrade openssl to 1.0.2g
We can't "break symlinks after extracting tarball" because they populate
that dir during the build now. So instead cripple mklink.pl to
copy instead of link. (Configure no-symlinks simply skips the symlink
step instead of copying, so that appears useless)

Change-Id: Ib30b2c1b8b3de72511d09c478297a7a5a4bc691e
Reviewed-on: https://gerrit.libreoffice.org/21880
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-07 16:07:39 +00:00

178 lines
6.1 KiB
Diff

diff -ru openssl.orig/crypto/x509v3/v3_pci.c openssl/crypto/x509v3/v3_pci.c
--- a/openssl.orig/crypto/x509v3/v3_pci.c 2016-03-01 14:35:05.000000000 +0100
+++ b/openssl/crypto/x509v3/v3_pci.c 2016-03-03 20:27:42.195914432 +0100
@@ -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
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
diff -ru openssl.orig/crypto/x509v3/v3_pcia.c openssl/crypto/x509v3/v3_pcia.c
--- a/openssl.orig/crypto/x509v3/v3_pcia.c 2016-03-01 14:35:05.000000000 +0100
+++ b/openssl/crypto/x509v3/v3_pcia.c 2016-03-03 20:27:56.495913984 +0100
@@ -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
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
diff -ru openssl.orig/ms/do_ms.bat openssl/ms/do_ms.bat
--- a/openssl.orig/ms/do_ms.bat 2015-01-15 15:43:14.000000000 +0100
+++ b/openssl/ms/do_ms.bat 2016-03-03 20:31:09.355907935 +0100
@@ -1,11 +1,11 @@
-perl util\mkfiles.pl >MINFO
-perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak
-perl util\mk1mf.pl dll no-asm VC-WIN32 >ms\ntdll.mak
-if x%OSVERSION% == x goto skipce
-perl util\mk1mf.pl no-asm VC-CE >ms\ce.mak
-perl util\mk1mf.pl dll no-asm VC-CE >ms\cedll.mak
-:skipce
+%1 util\mkfiles.pl >MINFO
+if %2 == VC-WIN32 goto not64a
+perl ms\uplink.pl win64a > ms\uptable.asm
+ml64 -c -Foms\uptable.obj ms\uptable.asm
+:not64a
+%1 util\mk1mf.pl no-asm %2 >ms\nt.mak
+%1 util\mk1mf.pl dll no-asm %2 >ms\ntdll.mak
-perl util\mkdef.pl 32 libeay > ms\libeay32.def
-perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
+%1 util\mkdef.pl 32 libeay > ms\libeay32.def
+%1 util\mkdef.pl 32 ssleay > ms\ssleay32.def
diff -ru openssl.orig/util/mk1mf.pl openssl/util/mk1mf.pl
--- a/openssl.orig/util/mk1mf.pl 2016-03-03 20:22:21.043924505 +0100
+++ b/openssl/util/mk1mf.pl 2016-03-03 20:34:45.015901171 +0100
@@ -163,7 +163,7 @@
$inc_def="outinc";
$tmp_def="tmp";
-$perl="perl" unless defined $perl;
+$perl="$ENV{PERL}" unless defined $perl;
$mkdir="-mkdir" unless defined $mkdir;
($ssl,$crypto)=("ssl","crypto");
@@ -347,6 +347,11 @@
s/\s*$//; # was chop, didn't work in mixture of perls for Windows...
($key,$val)=/^([^=]+)=(.*)/;
+
+ # On some Windows machines, $val has linefeeds at the end, which confuses
+ # subsequent code in this file. So we strip all whitespace at the end.
+ $val =~ s/\s+$//;
+
if ($key eq "RELATIVE_DIRECTORY")
{
if ($lib ne "")
@@ -473,7 +478,7 @@
# Set your compiler options
PLATFORM=$platform
CC=$bin_dir${cc}
-CFLAG=$cflags
+CFLAG=$cflags \$(SOLARINC)
APP_CFLAG=$app_cflag
LIB_CFLAG=$lib_cflag
SHLIB_CFLAG=$shl_cflag
@@ -488,7 +493,7 @@
LINK_CMD=$link
LFLAGS=$lflags
-RSC=$rsc
+RSC=$rsc \$(SOLARINC)
# The output directory for everything interesting
OUT_D=$out_dir
@@ -669,7 +674,7 @@
printf OUT <<EOF;
#ifdef $platform_cpp_symbol
/* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */
- #define CFLAGS "compiler: $cc $cflags"
+ #define CFLAGS "compiler: $cflags"
#define PLATFORM "$platform"
EOF
printf OUT " #define DATE \"%s\"\n", scalar gmtime();
diff -ru openssl.orig/util/pl/VC-32.pl openssl/util/pl/VC-32.pl
--- a/openssl.orig/util/pl/VC-32.pl 2016-03-01 14:35:53.000000000 +0100
+++ b/openssl/util/pl/VC-32.pl 2016-03-03 21:15:14.083824986 +0100
@@ -30,7 +30,7 @@
my $ff = "";
# C compiler stuff
-$cc='cl';
+$cc=$ENV{'CC'};
if ($FLAVOR =~ /WIN64/)
{
# Note that we currently don't have /WX on Win64! There is a lot of
@@ -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)=@_;
@@ -114,7 +114,7 @@
}
$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'}));
@@ -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";
- my $f = $shlib || $fips ?' /MD':' /MT';
+ my $f = $shlib || $fips ? (($ENV{MSVC_USE_DEBUG_RUNTIME} eq "TRUE") ? ' -MDd' : ' -MD' ):' -MT';
$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";
+ $opt_cflags=$f.' -Ox -O2 -Ob2';
+ $dbg_cflags=$f.'d -Od -DDEBUG -D_DEBUG';
}
-$lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
+$lib_cflag='-Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
$mlflags='';
$out_def ="out32"; $out_def.="dll" if ($shlib);
@@ -161,7 +162,7 @@
$obj='.obj';
$asm_suffix='.asm';
-$ofile="/Fo";
+$ofile="-Fo.\\";
# EXE linking stuff
$link="link";
diff -ru openssl.orig/ms/uplink.c openssl/ms/uplink.c
--- a/openssl.orig/ms/uplink.c 2015-03-19 15:02:02.000000000 +0100
+++ b/openssl/ms/uplink.c 2016-03-03 20:39:19.403892565 +0100
@@ -1,5 +1,6 @@
#if (defined(_WIN64) || defined(_WIN32_WCE)) && !defined(UNICODE)
# define UNICODE
+# define _CRT_NON_CONFORMING_SWPRINTFS
#endif
#if defined(UNICODE) && !defined(_UNICODE)
# define _UNICODE