RepositoryExternal.mk                                 |    5 
 download.lst                                          |    8 
 external/openssl/ExternalPackage_openssl.mk           |    4 
 external/openssl/ExternalProject_openssl.mk           |   15 -
 external/openssl/UnpackedTarball_openssl.mk           |   10 -
 external/openssl/openssl-1.0.1h-win64.patch.1         |   47 -----
 external/openssl/openssl-3650-masm.patch.1            |   35 ---
 external/openssl/openssl-fixbuild.patch.1             |   23 --
 external/openssl/openssl-no-multilib.patch.0          |   38 ++++
 external/openssl/openssllnx.patch                     |   23 --
 external/openssl/opensslsol.patch                     |   20 --
 external/openssl/opensslwnt.patch                     |  167 ------------------
 external/openssl/opensslwnt_safeseh.patch             |   23 --
 external/poppler/StaticLibrary_poppler.mk             |   22 ++
 external/poppler/poppler-config.patch.1               |   72 ++-----
 external/postgresql/ExternalProject_postgresql.mk     |    2 
 external/python3/ExternalProject_python3.mk           |    3 
 external/python3/python-3.5.4-ssl.patch.1             |    2 
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |    4 
 19 files changed, 103 insertions(+), 420 deletions(-)

New commits:
commit 1551ec1828a2cb5c9a700aafc0fcf7b23221ef2b
Author:     Martin Whitaker <f...@martin-whitaker.me.uk>
AuthorDate: Fri May 8 21:47:25 2020 +0200
Commit:     Vasily Melenchuk <vasily.melenc...@cib.de>
CommitDate: Wed Feb 17 17:23:53 2021 +0300

    tdf#131353: Fix build with poppler 0.86.0
    
    Change-Id: I89b4635a6a3e3a5522172d6f4c3f14e6c14994b1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93789
    Tested-by: René Engelhard <r...@debian.org>
    Tested-by: Jenkins
    Reviewed-by: Tomáš Chvátal <tchva...@suse.com>

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 36bab70cc6ad..94e771b9e8dc 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -563,7 +563,9 @@ void PDFOutDev::processLink(Link* link, Catalog*)
     if (!(pAction && pAction->getKind() == actionURI))
 return;
 
-#if POPPLER_CHECK_VERSION(0, 72, 0)
+#if POPPLER_CHECK_VERSION(0, 86, 0)
+    const char* pURI = static_cast<LinkURI*>(pAction)->getURI().c_str();
+#elif POPPLER_CHECK_VERSION(0, 72, 0)
     const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->c_str();
 #else
     const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString();
commit 44cf833302395c52f24d4c5a5727bb9efa228056
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Wed Jan 6 19:30:07 2021 +0100
Commit:     Vasily Melenchuk <vasily.melenc...@cib.de>
CommitDate: Wed Feb 17 12:12:51 2021 +0300

    poppler: upgrade to release 21.01.0
    
    Fixes CVE-2020-27778 and changelogs mention lots of fuzzing fixes.
    
    Change-Id: Ib07bdee726905e74afc13a01bbbd53f218121744
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108912
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/download.lst b/download.lst
index 03a59bb6af25..ab52c4e2c1c0 100644
--- a/download.lst
+++ b/download.lst
@@ -206,8 +206,8 @@ export PIXMAN_SHA256SUM := 
21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3
 export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
 export LIBPNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
 export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
-export POPPLER_SHA256SUM := 
234f8e573ea57fb6a008e7c1e56bfae1af5d1adf0e65f47555e1ae103874e4df
-export POPPLER_TARBALL := poppler-0.82.0.tar.xz
+export POPPLER_SHA256SUM := 
016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
+export POPPLER_TARBALL := poppler-21.01.0.tar.xz
 export POSTGRESQL_SHA256SUM := 
a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126
 export POSTGRESQL_TARBALL := postgresql-9.2.24.tar.bz2
 export PYTHON_SHA256SUM := 
c24a37c63a67f53bdd09c5f287b5cff8e8b98f857bf348c577d454d3f74db049
diff --git a/external/poppler/StaticLibrary_poppler.mk 
b/external/poppler/StaticLibrary_poppler.mk
index 8bf9f528ee9e..3cc0a95e3617 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -35,6 +35,23 @@ endif
 
 $(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,poppler,cc))
 
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,poppler,\
+       UnpackedTarball/poppler/poppler/CourierWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/CourierBoldWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/CourierBoldObliqueWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/CourierObliqueWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/HelveticaWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/HelveticaBoldWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/HelveticaBoldObliqueWidths.pregenerated 
\
+       UnpackedTarball/poppler/poppler/HelveticaObliqueWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/SymbolWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/TimesBoldWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/TimesBoldItalicWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/TimesItalicWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/TimesRomanWidths.pregenerated \
+       UnpackedTarball/poppler/poppler/ZapfDingbatsWidths.pregenerated \
+))
+
 $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
        UnpackedTarball/poppler/goo/gfile \
        UnpackedTarball/poppler/goo/GooTimer \
@@ -56,8 +73,7 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,poppler,\
        UnpackedTarball/poppler/fofi/FoFiIdentifier \
        UnpackedTarball/poppler/poppler/Annot \
        UnpackedTarball/poppler/poppler/Array \
-       UnpackedTarball/poppler/poppler/BuiltinFont \
-       UnpackedTarball/poppler/poppler/BuiltinFontTables \
+       UnpackedTarball/poppler/poppler/BBoxOutputDev \
        UnpackedTarball/poppler/poppler/CachedFile \
        UnpackedTarball/poppler/poppler/Catalog \
        UnpackedTarball/poppler/poppler/CertificateInfo \
@@ -79,6 +95,7 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,poppler,\
        UnpackedTarball/poppler/poppler/Hints \
        UnpackedTarball/poppler/poppler/JArithmeticDecoder \
        UnpackedTarball/poppler/poppler/JBIG2Stream \
+       UnpackedTarball/poppler/poppler/JSInfo \
        UnpackedTarball/poppler/poppler/Lexer \
        UnpackedTarball/poppler/poppler/Link \
        UnpackedTarball/poppler/poppler/Linearization \
@@ -93,6 +110,7 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,poppler,\
        UnpackedTarball/poppler/poppler/PageTransition \
        UnpackedTarball/poppler/poppler/Parser \
        UnpackedTarball/poppler/poppler/PDFDoc \
+       UnpackedTarball/poppler/poppler/PDFDocBuilder \
        UnpackedTarball/poppler/poppler/PDFDocEncoding \
        UnpackedTarball/poppler/poppler/PDFDocFactory \
        UnpackedTarball/poppler/poppler/ProfileData \
diff --git a/external/poppler/poppler-config.patch.1 
b/external/poppler/poppler-config.patch.1
index cb74cd66fb5e..b902402ea4e7 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -1,5 +1,7 @@
 *three* poppler config headers
 
+note: to get the 3rd one, use -DENABLE_CPP=on
+
 mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg 
-DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none 
-DENABLE_LIBCURL=off -DENABLE_ZLIB=off -DENABLE_ZLIB_UNCOMPRESS=off 
-DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off 
-DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off 
-DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off
 
 manually disabled these because cmake failed to do it:
@@ -14,7 +16,7 @@ new file mode 100644
 index 0fbd336a..451213f8 100644
 --- /dev/null
 +++ b/config.h
-@@ -0,0 +1,248 @@
+@@ -0,0 +1,221 @@
 +/* config.h.  Generated from config.h.cmake by cmake.  */
 +
 +/* Build against libcurl. */
@@ -120,21 +122,6 @@ index 0fbd336a..451213f8 100644
 +#endif
 +
 +#if !defined(_WIN32)
-+/* Define to 1 if you have the `rand_r' function. */
-+#define HAVE_RAND_R 1
-+#endif
-+
-+#if defined(_WIN32)
-+/* Define to 1 if you have the `strcpy_s' function. */
-+#define HAVE_STRCPY_S 1
-+#endif
-+
-+#if defined(_WIN32)
-+/* Define to 1 if you have the `strcat_s' function. */
-+#define HAVE_STRCAT_S 1
-+#endif
-+
-+#if !defined(_WIN32)
 +/* Defines if strtok_r is available on your system */
 +#define HAVE_STRTOK_R 1
 +#endif
@@ -147,9 +134,6 @@ index 0fbd336a..451213f8 100644
 +#define HAVE_POPEN 1
 +#endif
 +
-+/* Use splash for rendering. */
-+/* #undef HAVE_SPLASH */
-+
 +#if !defined(__APPLE__) && !defined(_WIN32)
 +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
 +   */
@@ -179,9 +163,6 @@ index 0fbd336a..451213f8 100644
 +/* Define as const if the declaration of iconv() needs const. */
 +#define ICONV_CONST 
 +
-+/* Enable multithreading support. */
-+#define MULTITHREADED 1
-+
 +/* Generate OPI comments in PS output. */
 +#define OPI_SUPPORT 1
 +
@@ -195,7 +176,7 @@ index 0fbd336a..451213f8 100644
 +#define PACKAGE_NAME "poppler"
 +
 +/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "poppler 0.82.0"
++#define PACKAGE_STRING "poppler 21.01.0"
 +
 +/* Define to the one symbol short name of this package. */
 +#define PACKAGE_TARNAME "poppler"
@@ -204,7 +185,7 @@ index 0fbd336a..451213f8 100644
 +#define PACKAGE_URL ""
 +
 +/* Define to the version of this package. */
-+#define PACKAGE_VERSION "0.82.0"
++#define PACKAGE_VERSION "21.01.0"
 +
 +/* Poppler data dir */
 +#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -212,23 +193,17 @@ index 0fbd336a..451213f8 100644
 +/* Support for curl based doc builder is compiled in. */
 +/* #undef POPPLER_HAS_CURL_SUPPORT */
 +
-+/* Include support for CMYK rasterization */
-+/* #undef SPLASH_CMYK */
-+
 +/* Enable word list support. */
 +#define TEXTOUT_WORD_LIST 1
 +
 +/* Defines if use cms */
 +/* #undef USE_CMS */
 +
-+/* Use fixed point arithmetic in the Splash backend */
-+/* #undef USE_FIXEDPOINT */
-+
 +/* Use single precision arithmetic in the Splash backend */
 +/* #undef USE_FLOAT */
 +
 +/* Version number of package */
-+#define VERSION "0.82.0"
++#define VERSION "21.01.0"
 +
 +#if defined(__APPLE__)
 +#elif defined (_WIN32)
@@ -268,7 +243,7 @@ new file mode 100644
 index 0fbd336a..451213f8 100644
 --- /dev/null
 +++ b/poppler/poppler-config.h
-@@ -0,0 +1,173 @@
+@@ -0,0 +1,166 @@
 +//================================================= -*- mode: c++ -*- ====
 +//
 +// poppler-config.h
@@ -288,6 +263,9 @@ index 0fbd336a..451213f8 100644
 +// Copyright (C) 2014 Hib Eris <h...@hiberis.nl>
 +// Copyright (C) 2016 Tor Lillqvist <t...@collabora.com>
 +// Copyright (C) 2017 Adrian Johnson <ajohn...@redneon.com>
++// Copyright (C) 2018 Adam Reichold <adam.reich...@t-online.de>
++// Copyright (C) 2018 Stefan Brüns <stefan.bru...@rwth-aachen.de>
++// Copyright (C) 2020 Albert Astals Cid <aa...@kde.org>
 +//
 +// To see a description of the changes please see the Changelog file that
 +// came with your tarball or type make ChangeLog if you are building from git
@@ -304,17 +282,7 @@ index 0fbd336a..451213f8 100644
 +
 +/* Defines the poppler version. */
 +#ifndef POPPLER_VERSION
-+#define POPPLER_VERSION "0.82.0"
-+#endif
-+
-+/* Enable multithreading support. */
-+#ifndef MULTITHREADED
-+#define MULTITHREADED 1
-+#endif
-+
-+/* Use fixedpoint. */
-+#ifndef USE_FIXEDPOINT
-+/* #undef USE_FIXEDPOINT */
++#define POPPLER_VERSION "21.01.0"
 +#endif
 +
 +/* Use single precision arithmetic in the Splash backend */
@@ -401,17 +369,17 @@ index 0fbd336a..451213f8 100644
 +/* #undef USE_BOOST_HEADERS */
 +#endif
 +
-+// Also, there are preprocessor symbols in the header files
-+// that are used but never defined when building poppler using configure
-+// or cmake: DISABLE_OUTLINE, DEBUG_MEM,
-+// ENABLE_PLUGINS, DEBUG_FORMS
++/* Is splash backend available */
++#ifndef HAVE_SPLASH
++/* #undef HAVE_SPLASH */
++#endif
 +
 +//------------------------------------------------------------------------
 +// version
 +//------------------------------------------------------------------------
 +
 +// copyright notice
-+#define popplerCopyright "Copyright 2005-2018 The Poppler Developers - 
http://poppler.freedesktop.org";
++#define popplerCopyright "Copyright 2005-2021 The Poppler Developers - 
http://poppler.freedesktop.org";
 +#define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC"
 +
 +//------------------------------------------------------------------------
@@ -429,7 +397,7 @@ index 0fbd336a..451213f8 100644
 +//------------------------------------------------------------------------
 +
 +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
-+#include <stdio.h> // __MINGW_PRINTF_FORMAT is defined in the mingw stdio.h
++#include <cstdio> // __MINGW_PRINTF_FORMAT is defined in the mingw stdio.h
 +#ifdef __MINGW_PRINTF_FORMAT
 +#define GCC_PRINTF_FORMAT(fmt_index, va_index) \
 +      __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index)))
@@ -471,9 +439,9 @@ index 0fbd336a..451213f8 100644
 +
 +#include "poppler-global.h"
 +
-+#define POPPLER_VERSION "0.82.0"
-+#define POPPLER_VERSION_MAJOR 0
-+#define POPPLER_VERSION_MINOR 82
++#define POPPLER_VERSION "21.01.0"
++#define POPPLER_VERSION_MAJOR 21
++#define POPPLER_VERSION_MINOR 1
 +#define POPPLER_VERSION_MICRO 0
 +
 +namespace poppler
commit b35bb8ceda6de5590500abd7def75e38cedc6a1c
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Jan 5 13:45:43 2021 +0100
Commit:     Vasily Melenchuk <vasily.melenc...@cib.de>
CommitDate: Wed Feb 17 10:37:58 2021 +0300

    openssl: upgrade to release 1.1.1i
    
    Fixes CVE-2020-1971
    
    * openssl-macos-arm64.patch.1: remove, was fixed upstream
    
    Change-Id: I405270228682025bf26240e3ea923bfd234068f5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108804
    Tested-by: Michael Stahl <michael.st...@allotropia.de>
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/download.lst b/download.lst
index 9c67c3beb870..03a59bb6af25 100644
--- a/download.lst
+++ b/download.lst
@@ -192,8 +192,8 @@ export OFFICEOTRON_SHA256SUM := 
f2443f27561af52324eee03a1892d9f569adc8db9e7bca55
 export OFFICEOTRON_JAR := 
8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar
 export OPENLDAP_SHA256SUM := 
cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824
 export OPENLDAP_TARBALL := openldap-2.4.45.tgz
-export OPENSSL_SHA256SUM := 
ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46
-export OPENSSL_TARBALL := openssl-1.1.1g.tar.gz
+export OPENSSL_SHA256SUM := 
e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242
+export OPENSSL_TARBALL := openssl-1.1.1i.tar.gz
 export ORCUS_SHA256SUM := 
3f48cfbc21ad74787218284939c04d42cb836c73bc393f27f538b668e4d78a5f
 export ORCUS_TARBALL := liborcus-0.14.1.tar.gz
 export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
commit 1cd75535c201a9c80c6ee7ee40950cb1fe858d8f
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Tue Jul 14 23:16:53 2020 +0200
Commit:     Vasily Melenchuk <vasily.melenc...@cib.de>
CommitDate: Tue Feb 16 22:02:29 2021 +0300

    openssl: update to 1.1.1g
    
    The OpenSSL 1.1.1 release is currently the only supported version
    and it already has the Windows Arm64 support I was looking for.
    
    This change also explicitly enables thread support, which Python
    depends on since release 3.7, which removed the --without-threads
    build option. But the explicit OPENSSL_THREADS was just added in
    3.8.4, so the old no-threads build fails now and was wrong since
    probably much longer.
    
    Change-Id: I61d94f966bc59407f213f4a81f0a49d0c05f8948
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98435
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>
    
     Conflicts:
            download.lst
            external/openssl/UnpackedTarball_openssl.mk
            external/python3/ExternalProject_python3.mk
            external/python3/python-3.7.6-msvc-ssl.patch.1
    
    Change-Id: If841be42cd5571e88ca765f101c742948fdb98f2

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 27e7f07d49ba..3d8ce2a880be 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1570,13 +1570,14 @@ define gb_LinkTarget__use_openssl
 $(call gb_LinkTarget_use_package,$(1),openssl)
 ifeq ($(OS),WNT)
 $(call gb_LinkTarget_add_libs,$(1),\
-       $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
-       $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
+       $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
+       $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
 )
 else
 $(call gb_LinkTarget_add_libs,$(1),\
        $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
        $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
+       $(if $(filter $(OS),LINUX),-pthread) \
 )
 $(call gb_LinkTarget_use_external_project,$(1),openssl)
 ifeq ($(OS),SOLARIS)
diff --git a/download.lst b/download.lst
index 49d7ebec08e1..9c67c3beb870 100644
--- a/download.lst
+++ b/download.lst
@@ -192,8 +192,8 @@ export OFFICEOTRON_SHA256SUM := 
f2443f27561af52324eee03a1892d9f569adc8db9e7bca55
 export OFFICEOTRON_JAR := 
8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar
 export OPENLDAP_SHA256SUM := 
cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824
 export OPENLDAP_TARBALL := openldap-2.4.45.tgz
-export OPENSSL_SHA256SUM := 
14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc
-export OPENSSL_TARBALL := openssl-1.0.2t.tar.gz
+export OPENSSL_SHA256SUM := 
ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46
+export OPENSSL_TARBALL := openssl-1.1.1g.tar.gz
 export ORCUS_SHA256SUM := 
3f48cfbc21ad74787218284939c04d42cb836c73bc393f27f538b668e4d78a5f
 export ORCUS_TARBALL := liborcus-0.14.1.tar.gz
 export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
diff --git a/external/openssl/ExternalPackage_openssl.mk 
b/external/openssl/ExternalPackage_openssl.mk
index 695c7b7119b6..de77f53f33b9 100644
--- a/external/openssl/ExternalPackage_openssl.mk
+++ b/external/openssl/ExternalPackage_openssl.mk
@@ -13,8 +13,8 @@ $(eval $(call 
gb_ExternalPackage_use_external_project,openssl,openssl))
 
 ifeq ($(COM),MSC)
 $(eval $(call gb_ExternalPackage_add_files,openssl,$(LIBO_LIB_FOLDER),\
-       out32dll/ssleay32.dll \
-       out32dll/libeay32.dll \
+    libcrypto-1_1.dll \
+    libssl-1_1.dll \
 ))
 endif
 
diff --git a/external/openssl/ExternalProject_openssl.mk 
b/external/openssl/ExternalProject_openssl.mk
index 24eab4ccfe58..17fd4c68da54 100644
--- a/external/openssl/ExternalProject_openssl.mk
+++ b/external/openssl/ExternalProject_openssl.mk
@@ -42,7 +42,9 @@ OPENSSL_PLATFORM := \
         ios-armv7\
       ,\
         $(if $(filter WNT,$(OS)),\
-          $(if $(filter INTEL,$(CPUNAME)),VC-WIN32,VC-WIN64A)\
+          $(if $(filter INTEL,$(CPUNAME)),VC-WIN32)\
+          $(if $(filter X86_64,$(CPUNAME)),VC-WIN64A)\
+          $(if $(filter ARM64,$(CPUNAME)),VC-WIN64-ARM)\
         ,\
           $(if $(filter MACOSX,$(OS)),\
             $(if $(filter POWERPC,$(CPUNAME)),darwin-ppc-cc)\
@@ -59,11 +61,9 @@ $(eval $(call gb_ExternalProject_use_nmake,openssl,build))
 
 $(call gb_ExternalProject_get_state_target,openssl,build):
        $(call gb_ExternalProject_run,build,\
-               export PERL="$(shell cygpath -w $(PERL))" \
-               && $(PERL) Configure $(OPENSSL_PLATFORM) no-idea \
-               && cmd /c "ms\do_ms.bat $(PERL) $(OPENSSL_PLATFORM)" \
-               && nmake -f "ms\ntdll.mak" \
-               && mv inc32/* include/ \
+               CONFIGURE_INSIST=1 $(PERL) Configure $(OPENSSL_PLATFORM) 
no-tests no-multilib \
+               && export PERL="$(shell cygpath -w $(PERL))" \
+               && nmake -f makefile \
        )
 
 else
@@ -75,8 +75,7 @@ $(call gb_ExternalProject_get_state_target,openssl,build):
                $(if $(filter WNT,$(OS)), \
                        $(PERL) Configure, \
                        ./config)) \
-                       $(OPENSSL_PLATFORM) no-dso no-shared \
-                       $(if $(filter-out WNT,$(OS)),no-idea) \
+                       $(OPENSSL_PLATFORM) no-dso no-shared no-tests 
no-multilib threads \
                        $(if $(filter-out ANDROID iOS WNT,$(OS)), \
                                $(if $(SYSBASE),-I$(SYSBASE)/usr/include 
-L$(SYSBASE)/usr/lib)) \
                        $(if $(filter 
MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO)
 \
diff --git a/external/openssl/UnpackedTarball_openssl.mk 
b/external/openssl/UnpackedTarball_openssl.mk
index 719b8b0e5842..6f00cf7f7e44 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -12,15 +12,7 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,openssl))
 $(eval $(call 
gb_UnpackedTarball_set_tarball,openssl,$(OPENSSL_TARBALL),,openssl))
 
 $(eval $(call gb_UnpackedTarball_add_patches,openssl,\
-       external/openssl/openssllnx.patch \
-       external/openssl/opensslwnt.patch \
-       $(if $(filter 
INTEL,$(CPUNAME)),external/openssl/opensslwnt_safeseh.patch) \
-       external/openssl/openssl-1.0.1h-win64.patch.1 \
-       external/openssl/opensslsol.patch \
-       external/openssl/opensslios.patch \
-       external/openssl/opensslosxppc.patch \
-       external/openssl/openssl-3650-masm.patch.1 \
-       external/openssl/openssl-fixbuild.patch.1 \
+       external/openssl/openssl-no-multilib.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/openssl/openssl-1.0.1h-win64.patch.1 
b/external/openssl/openssl-1.0.1h-win64.patch.1
deleted file mode 100644
index aea914633ebb..000000000000
--- a/external/openssl/openssl-1.0.1h-win64.patch.1
+++ /dev/null
@@ -1,47 +0,0 @@
-diff --git a/ms/do_win64a.bat b/ms/do_win64a.bat
-index 8768dc6..6772390 100755
---- a/ms/do_win64a.bat
-+++ b/ms/do_win64a.bat
-@@ -1,19 +1,19 @@
--perl util\mkfiles.pl >MINFO
-+perl util/mkfiles.pl >MINFO
- 
- cmd /c "nasm -f win64 -v" >NUL 2>&1
- if %errorlevel% neq 0 goto ml64
- 
--perl ms\uplink-x86_64.pl nasm > ms\uptable.asm
--nasm -f win64 -o ms\uptable.obj ms\uptable.asm
-+perl ms/uplink-x86_64.pl nasm > ms/uptable.asm
-+nasm -f win64 -o ms/uptable.obj ms/uptable.asm
- goto proceed
- 
- :ml64
--perl ms\uplink-x86_64.pl masm > ms\uptable.asm
--ml64 -c -Foms\uptable.obj ms\uptable.asm
-+perl ms/uplink-x86_64.pl masm > ms/uptable.asm
-+ml64 -c -Foms/uptable.obj ms/uptable.asm
- 
- :proceed
--perl util\mk1mf.pl VC-WIN64A >ms\nt.mak
--perl util\mk1mf.pl dll VC-WIN64A >ms\ntdll.mak
-+perl util/mk1mf.pl VC-WIN64A >ms/nt.mak
-+perl util/mk1mf.pl dll VC-WIN64A >ms/ntdll.mak
- 
--perl util\mkdef.pl 32 libeay > ms\libeay32.def
--perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
-+perl util/mkdef.pl 32 libeay > ms/libeay32.def
-+perl util/mkdef.pl 32 ssleay > ms/ssleay32.def
-diff --git a/util/mk1mf.pl b/util/mk1mf.pl
-index 72fa089..d98def1 100755
---- a/util/mk1mf.pl
-+++ b/util/mk1mf.pl
-@@ -233,6 +233,9 @@ else
-       $cflags.=' -DTERMIO';
-       }
- 
-+# force unix style path separator
-+${o} = "/";
-+
- $fipsdir =~ s/\//${o}/g;
- 
- $out_dir=(defined($VARS{'OUT'}))?$VARS{'OUT'}:$out_def.($debug?".dbg":"");
diff --git a/external/openssl/openssl-3650-masm.patch.1 
b/external/openssl/openssl-3650-masm.patch.1
deleted file mode 100644
index 97f1eb6446c3..000000000000
--- a/external/openssl/openssl-3650-masm.patch.1
+++ /dev/null
@@ -1,35 +0,0 @@
-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/openssl-fixbuild.patch.1 
b/external/openssl/openssl-fixbuild.patch.1
deleted file mode 100644
index 5a986e87214b..000000000000
--- a/external/openssl/openssl-fixbuild.patch.1
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/crypto/evp/Makefile
-+++ b/crypto/evp/Makefile
-@@ -289,7 +289,7 @@
- e_idea.o: ../../e_os.h ../../include/openssl/asn1.h 
../../include/openssl/bio.h
- e_idea.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
- e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
--e_idea.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
-+e_idea.o: ../../include/openssl/evp.h ../idea/idea.h
- e_idea.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
- e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
- e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
---- a/util/mklink.pl
-+++ b/util/mklink.pl
-@@ -50,8 +50,7 @@
- my $to = join('/', @to_path);
- 
- my $file;
--$symlink_exists=eval {symlink("",""); 1};
--if ($^O eq "msys") { $symlink_exists=0 };
-+$symlink_exists=0;
- foreach $file (@files) {
-     my $err = "";
-     if ($symlink_exists) {
diff --git a/external/openssl/openssl-no-multilib.patch.0 
b/external/openssl/openssl-no-multilib.patch.0
new file mode 100644
index 000000000000..07c45318ac25
--- /dev/null
+++ b/external/openssl/openssl-no-multilib.patch.0
@@ -0,0 +1,38 @@
+--- Configure.orig     2020-04-21 14:22:39.000000000 +0200
++++ Configure  2020-07-07 17:25:19.256297500 +0200
+@@ -24,7 +24,7 @@
+ my $orig_death_handler = $SIG{__DIE__};
+ $SIG{__DIE__} = \&death_handler;
+ 
+-my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] 
[-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] 
[[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] 
[--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] 
os/compiler[:flags]\n";
++my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] 
[-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] 
[[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [no-multilib] [sctp] [386] 
[--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] 
os/compiler[:flags]\n";
+ 
+ # Options:
+ #
+@@ -59,6 +59,7 @@
+ #               If disabled, it also disables shared and dynamic-engine.
+ # no-asm        do not use assembler
+ # no-egd        do not compile support for the entropy-gathering daemon APIs
++# no-multilib   exclude multilib identifier from library name
+ # [no-]zlib     [don't] compile support for zlib compression.
+ # zlib-dynamic  Like "zlib", but the zlib library is expected to be a shared
+ #               library and will be loaded in run-time by the OpenSSL library.
+@@ -383,6 +384,7 @@
+     "mdc2",
+     "msan",
+     "multiblock",
++    "multilib",
+     "nextprotoneg",
+     "pinshared",
+     "ocb",
+@@ -1754,6 +1756,10 @@
+             if (-f catfile($srcdir, "test", $_, "build.info"));
+     }
+ 
++    if ($disabled{"multilib"}) {
++        $target{"multilib"} = "";
++    }
++
+     $config{build_infos} = [ ];
+ 
+     my %ordinals = ();
diff --git a/external/openssl/openssllnx.patch 
b/external/openssl/openssllnx.patch
deleted file mode 100644
index 224df8f87b2e..000000000000
--- a/external/openssl/openssllnx.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- build/openssl-0.9.8v/Configure-old 2010-04-17 13:51:42.000000000 +0200
-+++ build/openssl-0.9.8v/Configure     2010-04-17 13:52:03.000000000 +0200
-@@ -388,6 +388,9 @@
- 
- "bsdi-elf-gcc",     "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 
-march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- 
-+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack 
-Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK 
BF_PTR2 DES_INT 
DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g 
-march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+
- "nextstep",   "cc:-O -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts}:::",
- "nextstep3.3",        "cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG 
${x86_gcc_des} ${x86_gcc_opts}:::",
- 
---- build/openssl-0.9.8v/Makefile.org  2010-01-27 17:06:36.000000000 +0100
-+++ build/openssl-0.9.8v/Makefile.org  2010-09-20 09:24:00.000000000 +0100
-@@ -206,7 +206,7 @@
- # same language for uniform treatment.
- BUILDENV=     LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
-               CC='$(CC)' CFLAG='$(CFLAG)'                     \
--              AS='$(CC)' ASFLAG='$(CFLAG) -c'                 \
-+              AS='$(CC)' ASFLAG='$(CFLAG) -c -Wa,--noexecstack'       \
-               AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)'        \
-               RC='$(RC)'                                      \
-               CROSS_COMPILE='$(CROSS_COMPILE)'        \
diff --git a/external/openssl/opensslsol.patch 
b/external/openssl/opensslsol.patch
deleted file mode 100644
index 6122b67c930e..000000000000
--- a/external/openssl/opensslsol.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- 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
-@@ -95,7 +95,7 @@
-     LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
-     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=      \
-@@ -105,7 +105,7 @@
-     SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
-     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 \
diff --git a/external/openssl/opensslwnt.patch 
b/external/openssl/opensslwnt.patch
deleted file mode 100644
index e22bea6f077b..000000000000
--- a/external/openssl/opensslwnt.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-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
-  * (rich...@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
-  * (rich...@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
-@@ -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';
-+    $opt_cflags=$f.' -Ox -O2 -Ob2';
-+    $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='';
- 
- $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
diff --git a/external/openssl/opensslwnt_safeseh.patch 
b/external/openssl/opensslwnt_safeseh.patch
deleted file mode 100644
index f2eafab5b9ed..000000000000
--- a/external/openssl/opensslwnt_safeseh.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-use /safeseh in 32-bit MSVC builds; this is not required for 64-bit
-
-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
-@@ -488,7 +493,7 @@
- SRC_D=$src_dir
- 
- LINK_CMD=$link
--LFLAGS=$lflags
-+LFLAGS=$lflags /SAFESEH
- RSC=$rsc \$(SOLARINC)
- 
- # The output directory for everything interesting
-@@ -511,7 +516,7 @@
- MKDIR=$mkdir
- MKLIB=$bin_dir$mklib
- MLFLAGS=$mlflags
--ASM=$bin_dir$asm
-+ASM=$bin_dir$asm /safeseh
- 
- # FIPS validated module and support file locations
- 
diff --git a/external/postgresql/ExternalProject_postgresql.mk 
b/external/postgresql/ExternalProject_postgresql.mk
index ba462a34a1a1..ea250a6c4e6b 100644
--- a/external/postgresql/ExternalProject_postgresql.mk
+++ b/external/postgresql/ExternalProject_postgresql.mk
@@ -40,7 +40,7 @@ endif
 ifeq ($(DISABLE_OPENSSL),)
 ifeq ($(SYSTEM_OPENSSL),)
 postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openssl)/include
-postgresql_LDFLAGS  += -L$(call gb_UnpackedTarball_get_dir,openssl)/
+postgresql_LDFLAGS  += -L$(call gb_UnpackedTarball_get_dir,openssl)/ $(if 
$(filter $(OS),LINUX),-pthread)
 endif
 endif
 
diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index b03b09a83bc4..405b633cde95 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -36,6 +36,9 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
                MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build \
                        /p:Configuration=$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
                        /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
+                       /p:opensslIncludeDir=$(call 
gb_UnpackedTarball_get_dir,openssl)/include \
+                       /p:opensslOutDir=$(call 
gb_UnpackedTarball_get_dir,openssl) \
+                       /p:zlibDir=$(call gb_UnpackedTarball_get_dir,zlib) \
                        /maxcpucount \
                        $(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 
/p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
                        $(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 
/p:VisualStudioVersion=16.0 /ToolsVersion:Current) \
diff --git a/external/python3/python-3.5.4-ssl.patch.1 
b/external/python3/python-3.5.4-ssl.patch.1
index beb6fe38882f..123588661d2f 100644
--- a/external/python3/python-3.5.4-ssl.patch.1
+++ b/external/python3/python-3.5.4-ssl.patch.1
@@ -34,7 +34,7 @@ diff -ru python3.orig/PCbuild/_ssl.vcxproj 
python3/PCbuild/_ssl.vcxproj
      </ClCompile>
      <Link>
 -      
<AdditionalDependencies>ws2_32.lib;crypt32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
-+      
<AdditionalDependencies>ws2_32.lib;crypt32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\libeay32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
++      
<AdditionalDependencies>ws2_32.lib;crypt32.lib;$(WORKDIR)\UnpackedTarball\openssl\libcrypto.lib;$(WORKDIR)\UnpackedTarball\openssl\libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>
      </Link>
    </ItemDefinitionGroup>
    <ItemGroup>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to