download.lst                            |    2 +-
 external/nss/ExternalProject_nss.mk     |    1 +
 external/nss/UnpackedTarball_nss.mk     |    2 ++
 external/nss/nss.cygwin64.in32bit.patch |   14 ++++++++++++++
 external/nss/nss.patch                  |   31 +++++++++++++++++++++++++++----
 external/nss/ubsan.patch.0              |   28 ++++++++--------------------
 6 files changed, 53 insertions(+), 25 deletions(-)

New commits:
commit 8e6ee22f2bffecff9d85058c6c21312585c6f1cc
Author: David Ostrovsky <da...@ostrovsky.org>
Date:   Tue Feb 23 22:25:06 2016 +0100

    Bump nss to 3.22.1 and nspr to 4.12
    
    It seems like nss has activated -Werror, even though the code is not
    warning free: [1].  This applies also to the additional patches that
    would need to be patched to be a warning free patch, endless recursion.
    
    To avoid messing around with something like that: [2], we disable
    -Werror option for now. Also note, that [2] doesn't fix all warnings,
    but only part of them so that we let with unsolved non-trivially to
    fix warnings on different supported compilers if we would choose the
    warning-free-compilation-path.
    
    [1] 
https://groups.google.com/d/topic/mozilla.dev.tech.crypto/TgnF3tIMxJ0/discussion
    [2] 
https://git.fedorahosted.org/cgit/nss-pem.git/commit/?id=ec2b9a90623b1ec5adb6ebe8d6651b35854786ec
    
    Reviewed-on: https://gerrit.libreoffice.org/22650
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: David Ostrovsky <da...@ostrovsky.org>
    (cherry picked from commit 486c91147c587febdacf3fa95d56633dbd703d5f)
    
    Change-Id: I762c03acede6c4eac715d3b0589061eeabbcc7c2
    Reviewed-on: https://gerrit.libreoffice.org/23102
    Reviewed-by: David Ostrovsky <da...@ostrovsky.org>
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/download.lst b/download.lst
index f000f78..40f44e6 100644
--- a/download.lst
+++ b/download.lst
@@ -109,7 +109,7 @@ export MWAW_TARBALL := 
libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.bz2
 export MYSQLCPPCONN_TARBALL := 
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_TARBALL := 231adebe5c2f78fded3e3df6e958878e-neon-0.30.1.tar.gz
-export NSS_TARBALL := 
478e0e90ebc4a90159549e77021021fd-nss-3.19.4-with-nspr-4.10.10.tar.gz
+export NSS_TARBALL := 
d45f17e742acd490d1df7256cb4356b6-nss-3.22.1-with-nspr-4.12.tar.gz
 export ODFGEN_MD5SUM := 8716be5c22ae8353f9aaa380d74840dc
 export ODFGEN_VERSION_MICRO := 4
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/ExternalProject_nss.mk 
b/external/nss/ExternalProject_nss.mk
index 17ea6f1..bd64971 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -22,6 +22,7 @@ $(call gb_ExternalProject_get_state_target,nss,configure):
                nspr/configure --includedir=$(call 
gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/include \
                        $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)) \
                        $(if $(filter 
MSC-X86_64,$(COM)-$(CPUNAME)),--enable-64bit) \
+                       $(if $(filter 
MSC-INTEL,$(COM)-$(CPUNAME)),--host=i686-pc-cygwin) \
        ,,nss_configure.log)
 
 ifeq ($(OS),WNT)
diff --git a/external/nss/UnpackedTarball_nss.mk 
b/external/nss/UnpackedTarball_nss.mk
index 1b9f45d..803e809 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -26,6 +26,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
         external/nss/nss-chromium-nss-static.patch \
         external/nss/nss-more-static.patch \
         external/nss/nss-ios.patch) \
+       $(if $(filter MSC-INTEL,$(COM)-$(CPUNAME)), \
+               external/nss/nss.cygwin64.in32bit.patch) \
 ))
 
 # nss-pem is only needed for internal curl to read the NSS CA database
diff --git a/external/nss/nss.cygwin64.in32bit.patch 
b/external/nss/nss.cygwin64.in32bit.patch
new file mode 100755
index 0000000..b00761a
--- /dev/null
+++ b/external/nss/nss.cygwin64.in32bit.patch
@@ -0,0 +1,14 @@
+This fixes architecture mismatch, when building
+on Cygwin 64bit and in 32bit mode
+diff -ru nss.orig/nss/Makefile nss/nss/Makefile
+--- a/nss.orig/nss/Makefile       2016-02-26 01:00:52.146713100 +0100
++++ b/nss/nss/Makefile    2016-02-26 01:02:05.303560100 +0100
+@@ -59,6 +59,8 @@
+ # Translate coreconf build options to NSPR configure options.
+ #
+
++NSPR_CONFIGURE_OPTS += --host=i686-pc-cygwin
++
+ ifeq ($(OS_TARGET),Android)
+ NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \
+                        --target=$(ANDROID_PREFIX) \
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index e555d6e..2cb23be 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -40,24 +40,34 @@ diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
  endif
  endif
  
-diff -ru a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk
---- a/a/nss/coreconf/arch.mk   2014-09-29 16:46:38.175421471 +0100
-+++ b/b/nss/coreconf/arch.mk   2014-09-29 16:47:42.986012244 +0100
-@@ -280,10 +280,15 @@
+diff -ru nss.orig/nss/coreconf/arch.mk nss/nss/coreconf/arch.mk
+--- a/nss.orig/nss/coreconf/arch.mk    2016-02-12 15:36:18.000000000 +0100
++++ b/nss/nss/coreconf/arch.mk 2016-02-23 20:48:31.595941079 +0100
+@@ -280,15 +280,21 @@
  # IMPL_STRATEGY may be defined too.
  #
  
+-ifdef CROSS_COMPILE
+-OBJDIR_NAME = 
$(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
+-else
 -OBJDIR_NAME = 
$(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
+-endif
 +# OBJDIR_NAME is used to build the directory containing the built objects, 
for 
 +# example mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ
 +# We need to deliver the contents of that folder into instdir. To make that 
 +# easier in the makefile we rename this directory to "out". 
++#ifdef CROSS_COMPILE
++#OBJDIR_NAME = 
$(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
++#else
 +#OBJDIR_NAME = 
$(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
++#endif
 +OBJDIR_NAME = out
  
+ 
  ifeq (,$(filter-out WIN%,$(OS_TARGET)))
 -ifndef BUILD_OPT
 +ifdef THIS_HAS_BEEN_DISABLED_TO_GET_out
++
  #
  # Define USE_DEBUG_RTL if you want to use the debug runtime library
  # (RTL) in the debug build
@@ -151,3 +161,16 @@ diff -ru a/nss/Makefile b/nss/Makefile
  #! gmake
  #
  # This Source Code Form is subject to the terms of the Mozilla Public
+diff -ru nss.orig/nss/coreconf/Werror.mk nss/nss/coreconf/Werror.mk
+--- a/nss.orig/nss/coreconf/Werror.mk  2016-02-12 15:36:18.000000000 +0100
++++ b/nss/nss/coreconf/Werror.mk       2016-02-23 23:58:15.119584046 +0100
+@@ -60,7 +60,8 @@
+   endif #ndef NSS_ENABLE_WERROR
+ 
+   ifeq ($(NSS_ENABLE_WERROR),1)
+-    WARNING_CFLAGS += -Werror
++# We do not treat warnings as errors.
++#    WARNING_CFLAGS += -Werror
+   else
+     # Old versions of gcc (< 4.8) don't support #pragma diagnostic in 
functions.
+     # Use this to disable use of that #pragma and the warnings it suppresses.
diff --git a/external/nss/ubsan.patch.0 b/external/nss/ubsan.patch.0
index 956e07b..ccf04b9 100644
--- a/external/nss/ubsan.patch.0
+++ b/external/nss/ubsan.patch.0
@@ -1,24 +1,12 @@
---- nss/lib/certdb/crl.c
-+++ nss/lib/certdb/crl.c
-@@ -2150,7 +2150,7 @@
+diff -ru nss.orig/nss/lib/certdb/crl.c nss/nss/lib/certdb/crl.c
+--- nss/lib/certdb/crl.c       2016-02-12 15:36:18.000000000 +0100
++++ nss/lib/certdb/crl.c       2016-02-23 20:57:17.067924598 +0100
+@@ -1982,7 +1982,7 @@
          return SECSuccess;
      }
      /* all CRLs are good, sort them by thisUpdate */
--    qsort(cache->crls, cache->ncrls, sizeof(CachedCrl*),
-+    if (cache->ncrls != 0) qsort(cache->crls, cache->ncrls, 
sizeof(CachedCrl*),
-           SortCRLsByThisUpdate);
- 
-     if (cache->ncrls)
---- nss/lib/libpkix/pkix/util/pkix_tools.h
-+++ nss/lib/libpkix/pkix/util/pkix_tools.h
-@@ -1458,8 +1458,8 @@
- 
- extern PRLogModuleInfo *pkixLog;
- 
--#define PKIX_MAGIC_HEADER           LL_INIT(0xFEEDC0FF, 0xEEFACADE)
--#define PKIX_MAGIC_HEADER_DESTROYED LL_INIT(0xBAADF00D, 0xDEADBEEF)
-+#define PKIX_MAGIC_HEADER           LL_INIT(0xFEEDC0FFU, 0xEEFACADEU)
-+#define PKIX_MAGIC_HEADER_DESTROYED LL_INIT(0xBAADF00DU, 0xDEADBEEFU)
- 
- /* see source file for function documentation */
+-    qsort(cache->crls, cache->ncrls, sizeof(CachedCrl*), 
SortCRLsByThisUpdate);
++    if (cache->ncrls != 0) qsort(cache->crls, cache->ncrls, 
sizeof(CachedCrl*), SortCRLsByThisUpdate);
  
+     if (cache->ncrls) {
+         /* pick the newest CRL */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to