[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - external_deps.lst nss/makefile.mk nss/nss_freebsd.patch nss/nss_linux.patch nss/nss_macosx.patch nss/nss.patch nss/prj scp2/source

Don Lewis truckman at apache.org
Mon Jul 18 08:08:50 UTC 2016


 external_deps.lst                    |    6 
 nss/makefile.mk                      |   74 +++++-----
 nss/nss.patch                        |  241 +++++++++++++++++++++++------------
 nss/nss_freebsd.patch                |    5 
 nss/nss_linux.patch                  |   38 ++---
 nss/nss_macosx.patch                 |   21 ---
 nss/prj/d.lst                        |    3 
 scp2/source/ooo/file_library_ooo.scp |    1 
 8 files changed, 227 insertions(+), 162 deletions(-)

New commits:
commit 65e38169a7edff860082509a596105deaf4afb7c
Author: Don Lewis <truckman at apache.org>
Date:   Mon Jul 18 07:09:58 2016 +0000

    #i126891# bundled nss-3.14.4-with-nspr-4.9.5 has many security
    
    vulnerabilities
    
    Upgrade bundled nss-3.14.4-with-nspr-4.9.5 to nss-3.25-with-nspr-4.12.
    These CVEs have been fixed since nss-3.14.4 was released:
    CVE-2014-1533
    CVE-2014-1534
    CVE-2014-1536
    CVE-2014-1537
    CVE-2014-1540
    CVE-2014-1541
    CVE-2014-1542
    CVE-2014-1543
    CVE-2014-1544
    CVE-2014-1545
    CVE-2014-1547
    CVE-2014-1548
    CVE-2014-1549
    CVE-2014-1550
    CVE-2014-1551
    CVE-2014-1552
    CVE-2014-1555
    CVE-2014-1556
    CVE-2014-1557
    CVE-2014-1558
    CVE-2014-1559
    CVE-2014-1560
    CVE-2014-1561
    CVE-2014-1568
    CVE-2014-1569
    CVE-2014-1587
    CVE-2014-1588
    CVE-2014-1589
    CVE-2014-1590
    CVE-2014-1591
    CVE-2014-1592
    CVE-2014-1593
    CVE-2014-1594
    CVE-2014-1595
    CVE-2015-4513
    CVE-2015-4514
    CVE-2015-4515
    CVE-2015-4518
    CVE-2015-7181
    CVE-2015-7182
    CVE-2015-7183
    CVE-2015-7185
    CVE-2015-7186
    CVE-2015-7187
    CVE-2015-7188
    CVE-2015-7189
    CVE-2015-7190
    CVE-2015-7191
    CVE-2015-7192
    CVE-2015-7193
    CVE-2015-7194
    CVE-2015-7195
    CVE-2015-7196
    CVE-2015-7197
    CVE-2015-7198
    CVE-2015-7199
    CVE-2015-7200
    CVE-2015-7575
    CVE-2016-1938
    CVE-2016-1950
    CVE-2016-1978
    CVE-2016-1979
    Whether any of these actually impacts OpenOffice is not known.
    
    Rebase the nss patches to the new version and move any non-conflicting
    changes from the platform-specific patch files to nss.patch.  The
    nss.patch.mingw file was already out of date and was not updated.
    
    Disable nss tests which require at least partial c++11 (-stdc++0x)
    support because they use nullptr.  This reportedly requires at least
    gcc 4.6, which is newer that some of what is provided by some of
    our supported platforms.
    
    Fix build issue on FreeBSD 11.0 and other platforms with picky compilers.
    The result of shifting a negative signed value is undefined in C and C++.
    The generated code does the expected thing in my experience and this
    construct just generates a compiler warning, but
    nss-3.24/nss/lib/zlib/inflate.c is compiled with -Werror, which breaks
    the build.  Fix the issue by doing the calculations using the equivalent
    unsigned type.  The function return should probably also be changed, but
    that is more invasive.
    
    Patch pratom.h to no include <intrin.H> inside an extern "C" block
    because it breaks the build on Windows.
    
    Recent versions of nss include a new shared library, libfreeblpriv3.so,
    so package it so that it gets installed.
    
    Temporarily change nss download URL from https to http to avoid breaking
    bootstrap on the buildbots.

diff --git a/external_deps.lst b/external_deps.lst
index 6d85e10..ae6cc38 100644
--- a/external_deps.lst
+++ b/external_deps.lst
@@ -313,9 +313,9 @@ if (ENABLE_CATEGORY_B==YES && SOLAR_JAVA==TRUE && ENABLE_JAVASCRIPT==YES)
     URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
 
 if (ENABLE_CATEGORY_B==YES && ENABLE_NSS_MODULE==YES)
-    MD5 = 067a04150b1d8b64f7da3019688a7547
-    name = nss-3.14.4-with-nspr-4.9.5.tar.gz
-    URL1 = https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_14_4_RTM/src/$(name)
+    MD5 = 4ec9a36c0f7c9360b149491c013b8d50
+    name = nss-3.25-with-nspr-4.12.tar.gz
+    URL1 = http://ftp.mozilla.org/pub/security/nss/releases/NSS_3_25_RTM/src/$(name)
     URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
 
 if (ENABLE_CATEGORY_B==YES && SYSTEM_SAXON!=YES && DISABLE_SAXON!=YES && SOLAR_JAVA==TRUE)
diff --git a/nss/makefile.mk b/nss/makefile.mk
index c14dc47..5d7ee14 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -39,9 +39,9 @@ all:
 
 .ELSE
 
-TARFILE_NAME=nss-3.14.4-with-nspr-4.9.5
-TARFILE_MD5=067a04150b1d8b64f7da3019688a7547
-TARFILE_ROOTDIR=nss-3.14.4
+TARFILE_NAME=nss-3.25-with-nspr-4.12
+TARFILE_MD5=4ec9a36c0f7c9360b149491c013b8d50
+TARFILE_ROOTDIR=nss-3.25
 PATCH_FILES=nss.patch
 
 .IF "$(OS)"=="MACOSX"
@@ -50,10 +50,6 @@ MACOS_SDK_DIR=$(SDK_PATH)
 PATCH_FILES+=nss_macosx.patch
 .ENDIF # "$(OS)"=="MACOSX"
 
-.IF "$(OS)"=="FREEBSD"
-PATCH_FILES+=nss_freebsd.patch
-.ENDIF
-
 .IF "$(debug)" != ""
 .ELSE
 BUILD_OPT=1
@@ -66,16 +62,20 @@ USE_64:=1
 .EXPORT : USE_64
 .ENDIF # "$(BUILD64)"=="1"
 
-OUT2LIB=mozilla$/dist$/out$/lib$/*$(DLLPOST)
+OUT2LIB=dist$/out$/lib$/*$(DLLPOST)
 
-BUILD_DIR=mozilla$/security$/nss
+BUILD_DIR=nss
 BUILD_ACTION= $(GNUMAKE) nss_build_all
 #See #i105566# && moz#513024#
 .IF "$(OS)"=="LINUX"
-BUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1
+BUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1 NSS_DISABLE_GTESTS=1
 PATCH_FILES+=nss_linux.patch
 .ENDIF
 
+.IF "$(OS)"=="FREEBSD"
+BUILD_ACTION+=FREEBL_LOWHASH=1 NSS_DISABLE_GTESTS=1
+.ENDIF
+
 
 .IF "$(GUI)"=="WNT"
 
@@ -99,20 +99,20 @@ nss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
 .ENDIF
 
 
-BUILD_DIR=mozilla$/security$/nss
-BUILD_ACTION=NS_USE_GCC=1 CC="$(nss_CC)" CXX="$(nss_CXX)" OS_LIBS="$(nss_LIBS)" OS_TARGET=WIN95 _WIN32_IE=0x500 PATH="$(PATH)" DEFINES=-D_WIN32_IE=0x500 $(GNUMAKE) nss_build_all
+BUILD_DIR=nss
+BUILD_ACTION= NSS_DISABLE_GTESTS=1 NS_USE_GCC=1 CC="$(nss_CC)" CXX="$(nss_CXX)" OS_LIBS="$(nss_LIBS)" OS_TARGET=WIN95 _WIN32_IE=0x500 PATH="$(PATH)" DEFINES=-D_WIN32_IE=0x500 $(GNUMAKE) nss_build_all
 
 OUT2LIB= \
-    mozilla$/dist$/out$/lib$/libnspr4.a \
-    mozilla$/dist$/out$/lib$/libnss3.a \
-    mozilla$/dist$/out$/lib$/libnssdbm3.a \
-    mozilla$/dist$/out$/lib$/libnssutil3.a \
-    mozilla$/dist$/out$/lib$/libplc4.a \
-    mozilla$/dist$/out$/lib$/libplds4.a \
-    mozilla$/dist$/out$/lib$/libsmime3.a \
-    mozilla$/dist$/out$/lib$/libsoftokn3.a \
-    mozilla$/dist$/out$/lib$/libsqlite3.a \
-    mozilla$/dist$/out$/lib$/libssl3.a
+    dist$/out$/lib$/libnspr4.a \
+    dist$/out$/lib$/libnss3.a \
+    dist$/out$/lib$/libnssdbm3.a \
+    dist$/out$/lib$/libnssutil3.a \
+    dist$/out$/lib$/libplc4.a \
+    dist$/out$/lib$/libplds4.a \
+    dist$/out$/lib$/libsmime3.a \
+    dist$/out$/lib$/libsoftokn3.a \
+    dist$/out$/lib$/libsqlite3.a \
+    dist$/out$/lib$/libssl3.a
 
 .ELSE			# "$(COM)"=="GCC"
 MOZ_MSVCVERSION= 9
@@ -130,30 +130,30 @@ OS_TARGET=WIN95
 EXT_USE_STLPORT=TRUE
 
 #To build nss one has to call "make nss_build_all" in 
-#mozilla/security/nss
-NSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/mozilla/security/nss)
+#nss
+NSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/nss)
 BUILD_ACTION= PATH="$(PATH):$(moz_build)/msys/bin:$(moz_build)/moztools/bin" && $(subst,/,$/ $(MOZILLABUILD)/msys/bin/bash) -i \
-    -c "cd $(NSS_BUILD_DIR) && make nss_build_all"
+    -c "cd $(NSS_BUILD_DIR) && make nss_build_all NSS_DISABLE_GTESTS=1"
 
 OUT2LIB= \
-    mozilla$/dist$/out$/lib$/nspr4.lib \
-    mozilla$/dist$/out$/lib$/nss3.lib \
-    mozilla$/dist$/out$/lib$/nssdbm3.lib \
-    mozilla$/dist$/out$/lib$/nssutil3.lib \
-    mozilla$/dist$/out$/lib$/plc4.lib \
-    mozilla$/dist$/out$/lib$/plds4.lib \
-    mozilla$/dist$/out$/lib$/smime3.lib \
-    mozilla$/dist$/out$/lib$/softokn3.lib \
-    mozilla$/dist$/out$/lib$/sqlite3.lib \
-    mozilla$/dist$/out$/lib$/ssl3.lib
+    dist$/out$/lib$/nspr4.lib \
+    dist$/out$/lib$/nss3.lib \
+    dist$/out$/lib$/nssdbm3.lib \
+    dist$/out$/lib$/nssutil3.lib \
+    dist$/out$/lib$/plc4.lib \
+    dist$/out$/lib$/plds4.lib \
+    dist$/out$/lib$/smime3.lib \
+    dist$/out$/lib$/softokn3.lib \
+    dist$/out$/lib$/sqlite3.lib \
+    dist$/out$/lib$/ssl3.lib
 
 .ENDIF			# "$(COM)"=="GCC"
 
-OUT2BIN=mozilla$/dist$/out$/lib$/*$(DLLPOST)
+OUT2BIN=dist$/out$/lib$/*$(DLLPOST)
 .ENDIF			# "$(GUI)"=="WNT"
 
 
-OUTDIR2INC=mozilla$/dist$/public$/nss mozilla$/dist$/out$/include
+OUTDIR2INC=dist$/public$/nss dist$/out$/include
 
 # --- Targets ------------------------------------------------------
 
diff --git a/nss/nss.patch b/nss/nss.patch
index d27de91..5caa67b 100644
--- a/nss/nss.patch
+++ b/nss/nss.patch
@@ -1,6 +1,7 @@
---- misc/nss-3.14.4/mozilla/nsprpub/config/rules.mk	2009-12-09 22:24:37.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/nsprpub/config/rules.mk	2010-06-11 16:35:54.946870871 +0200
-@@ -377,7 +377,12 @@
+diff -ur misc/nss-3.25/nspr/config/rules.mk misc/build/nss-3.25/nspr/config/rules.mk
+--- misc/nss-3.25/nspr/config/rules.mk	2016-02-12 05:51:25.000000000 -0800
++++ misc/build/nss-3.25/nspr/config/rules.mk	2016-07-14 23:47:54.492034000 -0700
+@@ -382,7 +382,12 @@
  ifdef NS_USE_GCC
  	$(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
  else
@@ -14,9 +15,10 @@
  endif # GCC
  	@echo $(RES) finished
  endif
---- misc/nss-3.14.4/mozilla/nsprpub/configure	2010-02-08 19:41:35.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/nsprpub/configure	2010-06-11 16:35:54.960188991 +0200
-@@ -4443,7 +4443,7 @@
+diff -ur misc/nss-3.25/nspr/configure misc/build/nss-3.25/nspr/configure
+--- misc/nss-3.25/nspr/configure	2016-02-12 05:51:25.000000000 -0800
++++ misc/build/nss-3.25/nspr/configure	2016-07-14 23:47:54.531323000 -0700
+@@ -6992,7 +6992,7 @@
      PR_MD_CSRCS=linux.c
      MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
      DSO_CFLAGS=-fPIC
@@ -25,11 +27,86 @@
      _OPTIMIZE_FLAGS=-O2
      _DEBUG_FLAGS="-g -fno-inline"  # most people on linux use gcc/gdb, and that
                                     # combo is not yet good at debugging inlined
---- misc/nss-3.14.4/mozilla/security/coreconf/Darwin.mk	2010-02-04 19:59:10.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/Darwin.mk	2010-06-11 16:35:54.966185975 +0200
-@@ -5,10 +5,12 @@
+diff -ur misc/nss-3.25/nspr/pr/include/pratom.h misc/build/nss-3.25/nspr/pr/include/pratom.h
+--- misc/nss-3.25/nspr/pr/include/pratom.h	2016-02-12 05:51:25.000000000 -0800
++++ misc/build/nss-3.25/nspr/pr/include/pratom.h	2016-07-14 23:47:54.538325000 -0700
+@@ -81,7 +81,9 @@
+ #if defined(_WIN32) && !defined(_WIN32_WCE) && \
+     (!defined(_MSC_VER) || (_MSC_VER >= 1310))
  
++PR_END_EXTERN_C
+ #include <intrin.h>
++PR_BEGIN_EXTERN_C
+ 
+ #ifdef _MSC_VER
+ #pragma intrinsic(_InterlockedIncrement)
+diff -ur misc/nss-3.25/nss/Makefile misc/build/nss-3.25/nss/Makefile
+--- misc/nss-3.25/nss/Makefile	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/Makefile	2016-07-14 23:47:54.544021000 -0700
+@@ -76,6 +76,9 @@
+ ifeq ($(OS_TARGET),WIN95)
+ NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
+ endif
++ifdef MACOS_SDK_DIR
++NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR)
++endif
+ ifdef USE_DEBUG_RTL
+ NSPR_CONFIGURE_OPTS += --enable-debug-rtl
+ endif
+diff -ur misc/nss-3.25/nss/cmd/platlibs.mk misc/build/nss-3.25/nss/cmd/platlibs.mk
+--- misc/nss-3.25/nss/cmd/platlibs.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/cmd/platlibs.mk	2016-07-14 23:47:54.549839000 -0700
+@@ -10,17 +10,18 @@
+ 
+ ifeq ($(OS_ARCH), SunOS) 
+ ifeq ($(USE_64), 1)
+-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
++#In AOO we would probable put the executables next to libs
++EXTRA_SHARED_LIBS += -R '$$ORIGIN'
+ else
+-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
++EXTRA_SHARED_LIBS += -R '$$ORIGIN'
+ endif
+ endif
+ 
+ ifeq ($(OS_ARCH), Linux)
+ ifeq ($(USE_64), 1)
+-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
++EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
+ else
+-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
++EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
+ endif
+ endif
+ 
+diff -ur misc/nss-3.25/nss/cmd/shlibsign/Makefile misc/build/nss-3.25/nss/cmd/shlibsign/Makefile
+--- misc/nss-3.25/nss/cmd/shlibsign/Makefile	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/cmd/shlibsign/Makefile	2016-07-14 23:47:54.554784000 -0700
+@@ -49,10 +49,15 @@
+ CHECKLIBS =
+ CHECKLOC =
+ else
+-CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
+-CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
++# Signing causes loading of some system library which in turn loads
++# libsqlite3. Then it loads libsqulite3 from nss, which does not have the proper
++# version. Therefore signing fails.
++# We cannot build with the system sqlite3, because it is too old (SDK
++# 10.4). Otherwise one could set NSS_USE_SYSTEM_SQLITE=1 and use the system lib.
++#CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
++#CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
+ ifndef NSS_DISABLE_DBM
+-CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
++#CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
+ endif
+ CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
+ 
+diff -ur misc/nss-3.25/nss/coreconf/Darwin.mk misc/build/nss-3.25/nss/coreconf/Darwin.mk
+--- misc/nss-3.25/nss/coreconf/Darwin.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/Darwin.mk	2016-07-14 23:47:54.560325000 -0700
+@@ -6,10 +6,12 @@
  include $(CORE_DEPTH)/coreconf/UNIX.mk
+ include $(CORE_DEPTH)/coreconf/Werror.mk
  
 -DEFAULT_COMPILER = gcc
 +DEFAULT_COMPILER = cc
@@ -43,8 +120,33 @@
  RANLIB		= ranlib
  
  ifndef CPU_ARCH
---- misc/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2010-01-15 23:19:00.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2010-06-11 16:35:54.981151732 +0200
+diff -ur misc/nss-3.25/nss/coreconf/FreeBSD.mk misc/build/nss-3.25/nss/coreconf/FreeBSD.mk
+--- misc/nss-3.25/nss/coreconf/FreeBSD.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/FreeBSD.mk	2016-07-14 23:47:54.564724000 -0700
+@@ -5,9 +5,8 @@
+ 
+ include $(CORE_DEPTH)/coreconf/UNIX.mk
+ 
+-DEFAULT_COMPILER	= gcc
+-CC			= gcc
+-CCC			= g++
++DEFAULT_COMPILER	= $(CC)
++CCC			= $(CXX)
+ RANLIB			= ranlib
+ 
+ CPU_ARCH		= $(OS_TEST)
+@@ -21,7 +20,7 @@
+ CPU_ARCH		= x86_64
+ endif
+ 
+-OS_CFLAGS		= $(DSO_CFLAGS) -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
++OS_CFLAGS		= $(DSO_CFLAGS) -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_UNISTD_H -DHAVE_BSD_FLOCK
+ 
+ DSO_CFLAGS		= -fPIC
+ DSO_LDOPTS		= -shared -Wl,-soname -Wl,$(notdir $@)
+diff -ur misc/nss-3.25/nss/coreconf/Linux.mk misc/build/nss-3.25/nss/coreconf/Linux.mk
+--- misc/nss-3.25/nss/coreconf/Linux.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/Linux.mk	2016-07-14 23:47:54.569918000 -0700
 @@ -16,8 +16,11 @@
  	IMPL_STRATEGY = _PTH
  endif
@@ -59,16 +161,25 @@
  RANLIB			= ranlib
  
  DEFAULT_COMPILER = gcc
-@@ -143,7 +146,7 @@
+@@ -139,7 +142,7 @@
+ OS_PTHREAD = -lpthread 
+ endif
+ 
+-OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR
++OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR -DHAVE_UNISTD_H
+ OS_LIBS			= $(OS_PTHREAD) -ldl -lc
+ 
+ ifdef USE_PTHREADS
+@@ -149,7 +152,7 @@
+ ARCH			= linux
+ 
+ DSO_CFLAGS		= -fPIC
+-DSO_LDOPTS		= -shared $(ARCHFLAG) -Wl,--gc-sections
++DSO_LDOPTS		= -shared $(ARCHFLAG) -Wl,--gc-sections '-Wl,-rpath,$$ORIGIN'
+ # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
  # incorrectly reports undefined references in the libraries we link with, so
  # we don't use -z defs there.
- ZDEFS_FLAG		= -Wl,-z,defs
--DSO_LDOPTS		+= $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
-+DSO_LDOPTS		+= $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) '-Wl,-rpath,$$ORIGIN'
- LDFLAGS			+= $(ARCHFLAG)
- 
- # On Maemo, we need to use the -rpath-link flag for even the standard system
-@@ -174,8 +177,13 @@
+@@ -189,8 +192,13 @@
  endif
  endif
  
@@ -82,8 +193,9 @@
  
  # The -rpath '$$ORIGIN' linker option instructs this library to search for its
  # dependencies in the same directory where it resides.
---- misc/nss-3.14.4/mozilla/security/coreconf/SunOS5.mk	2009-06-11 02:55:32.000000000 +0200
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/SunOS5.mk	2010-06-11 16:35:54.985571182 +0200
+diff -ur misc/nss-3.25/nss/coreconf/SunOS5.mk misc/build/nss-3.25/nss/coreconf/SunOS5.mk
+--- misc/nss-3.25/nss/coreconf/SunOS5.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/SunOS5.mk	2016-07-14 23:47:54.575211000 -0700
 @@ -48,8 +48,12 @@
  	    # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
  	endif
@@ -99,25 +211,27 @@
  	ASFLAGS   += -Wa,-P
  	OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
  	ifndef BUILD_OPT
---- misc/nss-3.14.4/mozilla/security/coreconf/arch.mk	2009-06-05 04:14:49.000000000 +0200
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/arch.mk	2010-06-11 16:35:54.990913282 +0200
-@@ -302,7 +302,12 @@
- # IMPL_STRATEGY may be defined too.
- #
- 
+diff -ur misc/nss-3.25/nss/coreconf/arch.mk misc/build/nss-3.25/nss/coreconf/arch.mk
+--- misc/nss-3.25/nss/coreconf/arch.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/arch.mk	2016-07-14 23:47:54.579901000 -0700
+@@ -294,7 +294,12 @@
+ 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
-+# OBJDIR_NAME is used to build the directory containing the built objects, for 
++# 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 the solver. To make that easier
-+# in the makefile we rename this directory to "out". 
++# in the makefile we rename this directory to "out".
 +#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
 +OBJDIR_NAME = out
+ endif
  
- ifeq (,$(filter-out WIN%,$(OS_TARGET)))
- ifndef BUILD_OPT
---- misc/nss-3.14.4/mozilla/security/coreconf/rules.mk	2009-12-08 02:33:36.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/rules.mk	2010-06-11 16:35:54.996448704 +0200
-@@ -318,7 +318,12 @@
+ 
+diff -ur misc/nss-3.25/nss/coreconf/rules.mk misc/build/nss-3.25/nss/coreconf/rules.mk
+--- misc/nss-3.25/nss/coreconf/rules.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/rules.mk	2016-07-14 23:47:54.586736000 -0700
+@@ -322,7 +322,12 @@
  ifdef NS_USE_GCC
  	$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
  else
@@ -131,49 +245,18 @@
  endif
  	@echo $(RES) finished
  endif
---- misc/nss-3.14.4/mozilla/security/nss/cmd/platlibs.mk	2010-02-04 19:59:10.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/nss/cmd/platlibs.mk	2010-06-11 16:35:55.004869805 +0200
-@@ -10,17 +10,18 @@
- 
- ifeq ($(OS_ARCH), SunOS) 
- ifeq ($(USE_64), 1)
--EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
-+#In AOO we would probable put the executables next to libs
-+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
- else
--EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
-+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
- endif
- endif
- 
- ifeq ($(OS_ARCH), Linux)
- ifeq ($(USE_64), 1)
--EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
-+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
- else
--EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
-+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
- endif
- endif
- 
---- misc/nss-3.14.4/mozilla/security/nss/cmd/shlibsign/Makefile	2009-08-07 21:06:37.000000000 +0200
-+++ misc/build/nss-3.14.4/mozilla/security/nss/cmd/shlibsign/Makefile	2010-06-11 16:35:55.009851148 +0200
-@@ -46,10 +46,15 @@
- 
- # sign any and all shared libraries that contain the word freebl
- 
--CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
--CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
-+# Signing causes loading of some system library which in turn loads
-+# libsqlite3. Then it loads libsqulite3 from nss, which does not have the proper
-+# version. Therefore signing fails.
-+# We cannot build with the system sqlite3, because it is too old (SDK
-+# 10.4). Otherwise one could set NSS_USE_SYSTEM_SQLITE=1 and use the system lib. 
-+#CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
-+#CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
- ifndef NSS_DISABLE_DBM
--CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
-+#CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
- endif
- CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
+diff -ur misc/nss-3.25/nss/lib/zlib/inflate.c misc/build/nss-3.25/nss/lib/zlib/inflate.c
+--- misc/nss-3.25/nss/lib/zlib/inflate.c	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/lib/zlib/inflate.c	2016-07-14 23:47:54.598199000 -0700
+@@ -1472,9 +1472,9 @@
+ {
+     struct inflate_state FAR *state;
  
+-    if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
++    if (strm == Z_NULL || strm->state == Z_NULL) return ~0UL << 16;
+     state = (struct inflate_state FAR *)strm->state;
+-    return ((long)(state->back) << 16) +
++    return ((unsigned long)(state->back) << 16) +
+         (state->mode == COPY ? state->length :
+             (state->mode == MATCH ? state->was - state->length : 0));
+ }
diff --git a/nss/nss_freebsd.patch b/nss/nss_freebsd.patch
index 53df536..d5cffbc 100644
--- a/nss/nss_freebsd.patch
+++ b/nss/nss_freebsd.patch
@@ -1,5 +1,6 @@
---- misc/nss-3.14.4/mozilla/security/coreconf/FreeBSD.mk	2012-05-03 09:42:51.000000000 +0000
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/FreeBSD.mk	2015-07-13 23:42:44.915864000 +0000
+diff -ur misc/nss-3.25/nss/coreconf/FreeBSD.mk misc/build/nss-3.25/nss/coreconf/FreeBSD.mk
+--- misc/nss-3.25/nss/coreconf/FreeBSD.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/FreeBSD.mk	2016-07-14 23:50:31.177316000 -0700
 @@ -5,9 +5,8 @@
  
  include $(CORE_DEPTH)/coreconf/UNIX.mk
diff --git a/nss/nss_linux.patch b/nss/nss_linux.patch
index ee601bb1..9d768b2 100644
--- a/nss/nss_linux.patch
+++ b/nss/nss_linux.patch
@@ -1,24 +1,14 @@
---- misc/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2013-11-01 14:39:28.195966851 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2013-11-01 14:39:10.246610849 +0100
-@@ -131,7 +131,7 @@
- # -ansi on platforms like Android where the system headers are C99 and do
- # not build with -ansi.
- STANDARDS_CFLAGS	= -D_POSIX_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE
--OS_CFLAGS		= $(STANDARDS_CFLAGS) $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR
-+OS_CFLAGS		= $(STANDARDS_CFLAGS) $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR -DHAVE_UNISTD_H
- OS_LIBS			= $(OS_PTHREAD) -ldl -lc
- 
- ifdef USE_PTHREADS
---- misc/nss-3.14.4/mozilla/security/nss/lib/freebl/Makefile	2013-01-31 02:08:59.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/nss/lib/freebl/Makefile	2014-01-10 13:57:48.000000000 +0100
-@@ -186,8 +186,8 @@
-     DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
- #   DEFINES += -DMPI_AMD64_ADD
-     # comment the next two lines to turn off intel HW accelleration
--    DEFINES += -DUSE_HW_AES
--    ASFILES += intel-aes.s intel-gcm.s
-+#    DEFINES += -DUSE_HW_AES
-+#    ASFILES += intel-aes.s intel-gcm.s
-     EXTRA_SRCS += intel-gcm-wrap.c
-     INTEL_GCM = 1
-     MPI_SRCS += mpi_amd64.c mp_comba.c
+diff -ur misc/nss-3.25/nss/lib/freebl/Makefile misc/build/nss-3.25/nss/lib/freebl/Makefile
+--- misc/nss-3.25/nss/lib/freebl/Makefile	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/lib/freebl/Makefile	2016-07-14 23:52:19.135925000 -0700
+@@ -153,8 +153,8 @@
+     # The Intel AES assembly code requires Visual C++ 2010.
+     # if $(_MSC_VER) >= 1600 (Visual C++ 2010)
+     ifeq ($(firstword $(sort $(_MSC_VER) 1600)),1600)
+-	DEFINES += -DUSE_HW_AES -DINTEL_GCM
+-	ASFILES += intel-aes-x86-masm.asm intel-gcm-x86-masm.asm
++	#DEFINES += -DUSE_HW_AES -DINTEL_GCM
++	#ASFILES += intel-aes-x86-masm.asm intel-gcm-x86-masm.asm
+ 	EXTRA_SRCS += intel-gcm-wrap.c
+ 	ifeq ($(CLANG_CL),1)
+ 	    INTEL_GCM_CLANG_CL = 1
diff --git a/nss/nss_macosx.patch b/nss/nss_macosx.patch
index 3fdf020..182df49 100644
--- a/nss/nss_macosx.patch
+++ b/nss/nss_macosx.patch
@@ -1,18 +1,7 @@
---- misc/nss-3.14.4/mozilla/security/nss/Makefile	2008-12-03 00:24:39.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/nss/Makefile	2009-11-27 13:36:22.662753328 +0100
-@@ -73,6 +73,9 @@
- ifeq ($(OS_TARGET),WIN95)
- NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
- endif
-+ifdef MACOS_SDK_DIR
-+NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR)
-+endif
- ifdef USE_DEBUG_RTL
- NSPR_CONFIGURE_OPTS += --enable-debug-rtl
- endif
---- misc/nss-3.14.4/mozilla/security/nss/lib/sqlite/config.mk	2012-12-12 13:30:51.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/nss/lib/sqlite/config.mk	2013-10-31 15:45:49.000000000 +0100
-@@ -39,9 +39,9 @@
+diff -ur misc/nss-3.25/nss/lib/sqlite/config.mk misc/build/nss-3.25/nss/lib/sqlite/config.mk
+--- misc/nss-3.25/nss/lib/sqlite/config.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/lib/sqlite/config.mk	2016-07-14 23:54:14.437879000 -0700
+@@ -35,9 +35,9 @@
  # OSAtomicCompareAndSwapPtrBarrier, which is only available on Mac OS X 10.5
  # (Darwin 9.0) and later. Define SQLITE_WITHOUT_ZONEMALLOC to disable
  # that code for older versions of Mac OS X. See bug 820374.
@@ -23,5 +12,5 @@
 +OSX_MINOR_LT_5 := $(shell [ $(OSX_TARGET_MINOR) -lt 5 ] && echo true)
 +ifeq ($(OSX_MINOR_LT_5),true)
  OS_CFLAGS += -DSQLITE_WITHOUT_ZONEMALLOC
- endif # Darwin
  endif
+ endif # Darwin
diff --git a/nss/prj/d.lst b/nss/prj/d.lst
index 5313bb5..c33f734 100644
--- a/nss/prj/d.lst
+++ b/nss/prj/d.lst
@@ -6,7 +6,8 @@ mkdir: %_DEST%\inc%_EXT%\mozilla\nss
 ..\%__SRC%\inc\include\obsolete\protypes.h %_DEST%\inc%_EXT%\mozilla\nspr\obsolete\protypes.h
 ..\%__SRC%\inc\nss\*.h %_DEST%\inc%_EXT%\mozilla\nss
 
-..\%__SRC%\lib\libfreebl3.* %_DEST%\lib%_EXT%\libfreebl.*
+..\%__SRC%\lib\libfreebl3.* %_DEST%\lib%_EXT%\libfreebl3.*
+..\%__SRC%\lib\libfreeblpriv3.* %_DEST%\lib%_EXT%\libfreeblpriv3.*
 ..\%__SRC%\lib\libfreebl_32fpu_3.* %_DEST%\lib%_EXT%\libfreebl_32fpu_3.*
 ..\%__SRC%\lib\libfreebl_32int64_3.* %_DEST%\lib%_EXT%\libfreebl_32int64_3.*
 ..\%__SRC%\lib\libfreebl_32int_3.* %_DEST%\lib%_EXT%\libfreebl_32int_3.*
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 4c6bca6..1958563 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -1643,6 +1643,7 @@ SPECIAL_LIB_FILE( gid_File_Lib_AVMediaWin, avmediawin )
 #ifdef BUNDLE_NSS_LIBS
 
 STD_LIB_FILE( gid_File_Lib_Freebl3, freebl3)
+STD_LIB_FILE( gid_File_Lib_Freeblpriv3, freeblpriv3)
 STD_LIB_FILE( gid_File_Lib_Nspr4, nspr4)
 STD_LIB_FILE( gid_File_Lib_Nss3, nss3)
 STD_LIB_FILE( gid_File_Lib_Nsckbi, nssckbi)
commit 6bff19311a945038e5b94d53e0d7a87f66456e97
Author: Don Lewis <truckman at apache.org>
Date:   Mon Jul 18 07:05:14 2016 +0000

    Revert previous change, mangled commit message.

diff --git a/external_deps.lst b/external_deps.lst
index ae6cc38..6d85e10 100644
--- a/external_deps.lst
+++ b/external_deps.lst
@@ -313,9 +313,9 @@ if (ENABLE_CATEGORY_B==YES && SOLAR_JAVA==TRUE && ENABLE_JAVASCRIPT==YES)
     URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
 
 if (ENABLE_CATEGORY_B==YES && ENABLE_NSS_MODULE==YES)
-    MD5 = 4ec9a36c0f7c9360b149491c013b8d50
-    name = nss-3.25-with-nspr-4.12.tar.gz
-    URL1 = http://ftp.mozilla.org/pub/security/nss/releases/NSS_3_25_RTM/src/$(name)
+    MD5 = 067a04150b1d8b64f7da3019688a7547
+    name = nss-3.14.4-with-nspr-4.9.5.tar.gz
+    URL1 = https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_14_4_RTM/src/$(name)
     URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
 
 if (ENABLE_CATEGORY_B==YES && SYSTEM_SAXON!=YES && DISABLE_SAXON!=YES && SOLAR_JAVA==TRUE)
diff --git a/nss/makefile.mk b/nss/makefile.mk
index 5d7ee14..c14dc47 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -39,9 +39,9 @@ all:
 
 .ELSE
 
-TARFILE_NAME=nss-3.25-with-nspr-4.12
-TARFILE_MD5=4ec9a36c0f7c9360b149491c013b8d50
-TARFILE_ROOTDIR=nss-3.25
+TARFILE_NAME=nss-3.14.4-with-nspr-4.9.5
+TARFILE_MD5=067a04150b1d8b64f7da3019688a7547
+TARFILE_ROOTDIR=nss-3.14.4
 PATCH_FILES=nss.patch
 
 .IF "$(OS)"=="MACOSX"
@@ -50,6 +50,10 @@ MACOS_SDK_DIR=$(SDK_PATH)
 PATCH_FILES+=nss_macosx.patch
 .ENDIF # "$(OS)"=="MACOSX"
 
+.IF "$(OS)"=="FREEBSD"
+PATCH_FILES+=nss_freebsd.patch
+.ENDIF
+
 .IF "$(debug)" != ""
 .ELSE
 BUILD_OPT=1
@@ -62,20 +66,16 @@ USE_64:=1
 .EXPORT : USE_64
 .ENDIF # "$(BUILD64)"=="1"
 
-OUT2LIB=dist$/out$/lib$/*$(DLLPOST)
+OUT2LIB=mozilla$/dist$/out$/lib$/*$(DLLPOST)
 
-BUILD_DIR=nss
+BUILD_DIR=mozilla$/security$/nss
 BUILD_ACTION= $(GNUMAKE) nss_build_all
 #See #i105566# && moz#513024#
 .IF "$(OS)"=="LINUX"
-BUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1 NSS_DISABLE_GTESTS=1
+BUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1
 PATCH_FILES+=nss_linux.patch
 .ENDIF
 
-.IF "$(OS)"=="FREEBSD"
-BUILD_ACTION+=FREEBL_LOWHASH=1 NSS_DISABLE_GTESTS=1
-.ENDIF
-
 
 .IF "$(GUI)"=="WNT"
 
@@ -99,20 +99,20 @@ nss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
 .ENDIF
 
 
-BUILD_DIR=nss
-BUILD_ACTION= NSS_DISABLE_GTESTS=1 NS_USE_GCC=1 CC="$(nss_CC)" CXX="$(nss_CXX)" OS_LIBS="$(nss_LIBS)" OS_TARGET=WIN95 _WIN32_IE=0x500 PATH="$(PATH)" DEFINES=-D_WIN32_IE=0x500 $(GNUMAKE) nss_build_all
+BUILD_DIR=mozilla$/security$/nss
+BUILD_ACTION=NS_USE_GCC=1 CC="$(nss_CC)" CXX="$(nss_CXX)" OS_LIBS="$(nss_LIBS)" OS_TARGET=WIN95 _WIN32_IE=0x500 PATH="$(PATH)" DEFINES=-D_WIN32_IE=0x500 $(GNUMAKE) nss_build_all
 
 OUT2LIB= \
-    dist$/out$/lib$/libnspr4.a \
-    dist$/out$/lib$/libnss3.a \
-    dist$/out$/lib$/libnssdbm3.a \
-    dist$/out$/lib$/libnssutil3.a \
-    dist$/out$/lib$/libplc4.a \
-    dist$/out$/lib$/libplds4.a \
-    dist$/out$/lib$/libsmime3.a \
-    dist$/out$/lib$/libsoftokn3.a \
-    dist$/out$/lib$/libsqlite3.a \
-    dist$/out$/lib$/libssl3.a
+    mozilla$/dist$/out$/lib$/libnspr4.a \
+    mozilla$/dist$/out$/lib$/libnss3.a \
+    mozilla$/dist$/out$/lib$/libnssdbm3.a \
+    mozilla$/dist$/out$/lib$/libnssutil3.a \
+    mozilla$/dist$/out$/lib$/libplc4.a \
+    mozilla$/dist$/out$/lib$/libplds4.a \
+    mozilla$/dist$/out$/lib$/libsmime3.a \
+    mozilla$/dist$/out$/lib$/libsoftokn3.a \
+    mozilla$/dist$/out$/lib$/libsqlite3.a \
+    mozilla$/dist$/out$/lib$/libssl3.a
 
 .ELSE			# "$(COM)"=="GCC"
 MOZ_MSVCVERSION= 9
@@ -130,30 +130,30 @@ OS_TARGET=WIN95
 EXT_USE_STLPORT=TRUE
 
 #To build nss one has to call "make nss_build_all" in 
-#nss
-NSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/nss)
+#mozilla/security/nss
+NSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/mozilla/security/nss)
 BUILD_ACTION= PATH="$(PATH):$(moz_build)/msys/bin:$(moz_build)/moztools/bin" && $(subst,/,$/ $(MOZILLABUILD)/msys/bin/bash) -i \
-    -c "cd $(NSS_BUILD_DIR) && make nss_build_all NSS_DISABLE_GTESTS=1"
+    -c "cd $(NSS_BUILD_DIR) && make nss_build_all"
 
 OUT2LIB= \
-    dist$/out$/lib$/nspr4.lib \
-    dist$/out$/lib$/nss3.lib \
-    dist$/out$/lib$/nssdbm3.lib \
-    dist$/out$/lib$/nssutil3.lib \
-    dist$/out$/lib$/plc4.lib \
-    dist$/out$/lib$/plds4.lib \
-    dist$/out$/lib$/smime3.lib \
-    dist$/out$/lib$/softokn3.lib \
-    dist$/out$/lib$/sqlite3.lib \
-    dist$/out$/lib$/ssl3.lib
+    mozilla$/dist$/out$/lib$/nspr4.lib \
+    mozilla$/dist$/out$/lib$/nss3.lib \
+    mozilla$/dist$/out$/lib$/nssdbm3.lib \
+    mozilla$/dist$/out$/lib$/nssutil3.lib \
+    mozilla$/dist$/out$/lib$/plc4.lib \
+    mozilla$/dist$/out$/lib$/plds4.lib \
+    mozilla$/dist$/out$/lib$/smime3.lib \
+    mozilla$/dist$/out$/lib$/softokn3.lib \
+    mozilla$/dist$/out$/lib$/sqlite3.lib \
+    mozilla$/dist$/out$/lib$/ssl3.lib
 
 .ENDIF			# "$(COM)"=="GCC"
 
-OUT2BIN=dist$/out$/lib$/*$(DLLPOST)
+OUT2BIN=mozilla$/dist$/out$/lib$/*$(DLLPOST)
 .ENDIF			# "$(GUI)"=="WNT"
 
 
-OUTDIR2INC=dist$/public$/nss dist$/out$/include
+OUTDIR2INC=mozilla$/dist$/public$/nss mozilla$/dist$/out$/include
 
 # --- Targets ------------------------------------------------------
 
diff --git a/nss/nss.patch b/nss/nss.patch
index 5caa67b..d27de91 100644
--- a/nss/nss.patch
+++ b/nss/nss.patch
@@ -1,7 +1,6 @@
-diff -ur misc/nss-3.25/nspr/config/rules.mk misc/build/nss-3.25/nspr/config/rules.mk
---- misc/nss-3.25/nspr/config/rules.mk	2016-02-12 05:51:25.000000000 -0800
-+++ misc/build/nss-3.25/nspr/config/rules.mk	2016-07-14 23:47:54.492034000 -0700
-@@ -382,7 +382,12 @@
+--- misc/nss-3.14.4/mozilla/nsprpub/config/rules.mk	2009-12-09 22:24:37.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/nsprpub/config/rules.mk	2010-06-11 16:35:54.946870871 +0200
+@@ -377,7 +377,12 @@
  ifdef NS_USE_GCC
  	$(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
  else
@@ -15,10 +14,9 @@ diff -ur misc/nss-3.25/nspr/config/rules.mk misc/build/nss-3.25/nspr/config/rule
  endif # GCC
  	@echo $(RES) finished
  endif
-diff -ur misc/nss-3.25/nspr/configure misc/build/nss-3.25/nspr/configure
---- misc/nss-3.25/nspr/configure	2016-02-12 05:51:25.000000000 -0800
-+++ misc/build/nss-3.25/nspr/configure	2016-07-14 23:47:54.531323000 -0700
-@@ -6992,7 +6992,7 @@
+--- misc/nss-3.14.4/mozilla/nsprpub/configure	2010-02-08 19:41:35.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/nsprpub/configure	2010-06-11 16:35:54.960188991 +0200
+@@ -4443,7 +4443,7 @@
      PR_MD_CSRCS=linux.c
      MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
      DSO_CFLAGS=-fPIC
@@ -27,86 +25,11 @@ diff -ur misc/nss-3.25/nspr/configure misc/build/nss-3.25/nspr/configure
      _OPTIMIZE_FLAGS=-O2
      _DEBUG_FLAGS="-g -fno-inline"  # most people on linux use gcc/gdb, and that
                                     # combo is not yet good at debugging inlined
-diff -ur misc/nss-3.25/nspr/pr/include/pratom.h misc/build/nss-3.25/nspr/pr/include/pratom.h
---- misc/nss-3.25/nspr/pr/include/pratom.h	2016-02-12 05:51:25.000000000 -0800
-+++ misc/build/nss-3.25/nspr/pr/include/pratom.h	2016-07-14 23:47:54.538325000 -0700
-@@ -81,7 +81,9 @@
- #if defined(_WIN32) && !defined(_WIN32_WCE) && \
-     (!defined(_MSC_VER) || (_MSC_VER >= 1310))
+--- misc/nss-3.14.4/mozilla/security/coreconf/Darwin.mk	2010-02-04 19:59:10.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/Darwin.mk	2010-06-11 16:35:54.966185975 +0200
+@@ -5,10 +5,12 @@
  
-+PR_END_EXTERN_C
- #include <intrin.h>
-+PR_BEGIN_EXTERN_C
- 
- #ifdef _MSC_VER
- #pragma intrinsic(_InterlockedIncrement)
-diff -ur misc/nss-3.25/nss/Makefile misc/build/nss-3.25/nss/Makefile
---- misc/nss-3.25/nss/Makefile	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/Makefile	2016-07-14 23:47:54.544021000 -0700
-@@ -76,6 +76,9 @@
- ifeq ($(OS_TARGET),WIN95)
- NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
- endif
-+ifdef MACOS_SDK_DIR
-+NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR)
-+endif
- ifdef USE_DEBUG_RTL
- NSPR_CONFIGURE_OPTS += --enable-debug-rtl
- endif
-diff -ur misc/nss-3.25/nss/cmd/platlibs.mk misc/build/nss-3.25/nss/cmd/platlibs.mk
---- misc/nss-3.25/nss/cmd/platlibs.mk	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/cmd/platlibs.mk	2016-07-14 23:47:54.549839000 -0700
-@@ -10,17 +10,18 @@
- 
- ifeq ($(OS_ARCH), SunOS) 
- ifeq ($(USE_64), 1)
--EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
-+#In AOO we would probable put the executables next to libs
-+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
- else
--EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
-+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
- endif
- endif
- 
- ifeq ($(OS_ARCH), Linux)
- ifeq ($(USE_64), 1)
--EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
-+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
- else
--EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
-+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
- endif
- endif
- 
-diff -ur misc/nss-3.25/nss/cmd/shlibsign/Makefile misc/build/nss-3.25/nss/cmd/shlibsign/Makefile
---- misc/nss-3.25/nss/cmd/shlibsign/Makefile	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/cmd/shlibsign/Makefile	2016-07-14 23:47:54.554784000 -0700
-@@ -49,10 +49,15 @@
- CHECKLIBS =
- CHECKLOC =
- else
--CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
--CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
-+# Signing causes loading of some system library which in turn loads
-+# libsqlite3. Then it loads libsqulite3 from nss, which does not have the proper
-+# version. Therefore signing fails.
-+# We cannot build with the system sqlite3, because it is too old (SDK
-+# 10.4). Otherwise one could set NSS_USE_SYSTEM_SQLITE=1 and use the system lib.
-+#CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
-+#CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
- ifndef NSS_DISABLE_DBM
--CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
-+#CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
- endif
- CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
- 
-diff -ur misc/nss-3.25/nss/coreconf/Darwin.mk misc/build/nss-3.25/nss/coreconf/Darwin.mk
---- misc/nss-3.25/nss/coreconf/Darwin.mk	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/coreconf/Darwin.mk	2016-07-14 23:47:54.560325000 -0700
-@@ -6,10 +6,12 @@
  include $(CORE_DEPTH)/coreconf/UNIX.mk
- include $(CORE_DEPTH)/coreconf/Werror.mk
  
 -DEFAULT_COMPILER = gcc
 +DEFAULT_COMPILER = cc
@@ -120,33 +43,8 @@ diff -ur misc/nss-3.25/nss/coreconf/Darwin.mk misc/build/nss-3.25/nss/coreconf/D
  RANLIB		= ranlib
  
  ifndef CPU_ARCH
-diff -ur misc/nss-3.25/nss/coreconf/FreeBSD.mk misc/build/nss-3.25/nss/coreconf/FreeBSD.mk
---- misc/nss-3.25/nss/coreconf/FreeBSD.mk	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/coreconf/FreeBSD.mk	2016-07-14 23:47:54.564724000 -0700
-@@ -5,9 +5,8 @@
- 
- include $(CORE_DEPTH)/coreconf/UNIX.mk
- 
--DEFAULT_COMPILER	= gcc
--CC			= gcc
--CCC			= g++
-+DEFAULT_COMPILER	= $(CC)
-+CCC			= $(CXX)
- RANLIB			= ranlib
- 
- CPU_ARCH		= $(OS_TEST)
-@@ -21,7 +20,7 @@
- CPU_ARCH		= x86_64
- endif
- 
--OS_CFLAGS		= $(DSO_CFLAGS) -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
-+OS_CFLAGS		= $(DSO_CFLAGS) -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_UNISTD_H -DHAVE_BSD_FLOCK
- 
- DSO_CFLAGS		= -fPIC
- DSO_LDOPTS		= -shared -Wl,-soname -Wl,$(notdir $@)
-diff -ur misc/nss-3.25/nss/coreconf/Linux.mk misc/build/nss-3.25/nss/coreconf/Linux.mk
---- misc/nss-3.25/nss/coreconf/Linux.mk	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/coreconf/Linux.mk	2016-07-14 23:47:54.569918000 -0700
+--- misc/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2010-01-15 23:19:00.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2010-06-11 16:35:54.981151732 +0200
 @@ -16,8 +16,11 @@
  	IMPL_STRATEGY = _PTH
  endif
@@ -161,25 +59,16 @@ diff -ur misc/nss-3.25/nss/coreconf/Linux.mk misc/build/nss-3.25/nss/coreconf/Li
  RANLIB			= ranlib
  
  DEFAULT_COMPILER = gcc
-@@ -139,7 +142,7 @@
- OS_PTHREAD = -lpthread 
- endif
- 
--OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR
-+OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR -DHAVE_UNISTD_H
- OS_LIBS			= $(OS_PTHREAD) -ldl -lc
- 
- ifdef USE_PTHREADS
-@@ -149,7 +152,7 @@
- ARCH			= linux
- 
- DSO_CFLAGS		= -fPIC
--DSO_LDOPTS		= -shared $(ARCHFLAG) -Wl,--gc-sections
-+DSO_LDOPTS		= -shared $(ARCHFLAG) -Wl,--gc-sections '-Wl,-rpath,$$ORIGIN'
- # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
+@@ -143,7 +146,7 @@
  # incorrectly reports undefined references in the libraries we link with, so
  # we don't use -z defs there.
-@@ -189,8 +192,13 @@
+ ZDEFS_FLAG		= -Wl,-z,defs
+-DSO_LDOPTS		+= $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
++DSO_LDOPTS		+= $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) '-Wl,-rpath,$$ORIGIN'
+ LDFLAGS			+= $(ARCHFLAG)
+ 
+ # On Maemo, we need to use the -rpath-link flag for even the standard system
+@@ -174,8 +177,13 @@
  endif
  endif
  
@@ -193,9 +82,8 @@ diff -ur misc/nss-3.25/nss/coreconf/Linux.mk misc/build/nss-3.25/nss/coreconf/Li
  
  # The -rpath '$$ORIGIN' linker option instructs this library to search for its
  # dependencies in the same directory where it resides.
-diff -ur misc/nss-3.25/nss/coreconf/SunOS5.mk misc/build/nss-3.25/nss/coreconf/SunOS5.mk
---- misc/nss-3.25/nss/coreconf/SunOS5.mk	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/coreconf/SunOS5.mk	2016-07-14 23:47:54.575211000 -0700
+--- misc/nss-3.14.4/mozilla/security/coreconf/SunOS5.mk	2009-06-11 02:55:32.000000000 +0200
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/SunOS5.mk	2010-06-11 16:35:54.985571182 +0200
 @@ -48,8 +48,12 @@
  	    # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
  	endif
@@ -211,27 +99,25 @@ diff -ur misc/nss-3.25/nss/coreconf/SunOS5.mk misc/build/nss-3.25/nss/coreconf/S
  	ASFLAGS   += -Wa,-P
  	OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
  	ifndef BUILD_OPT
-diff -ur misc/nss-3.25/nss/coreconf/arch.mk misc/build/nss-3.25/nss/coreconf/arch.mk
---- misc/nss-3.25/nss/coreconf/arch.mk	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/coreconf/arch.mk	2016-07-14 23:47:54.579901000 -0700
-@@ -294,7 +294,12 @@
- ifdef CROSS_COMPILE
- OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
- else
+--- misc/nss-3.14.4/mozilla/security/coreconf/arch.mk	2009-06-05 04:14:49.000000000 +0200
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/arch.mk	2010-06-11 16:35:54.990913282 +0200
+@@ -302,7 +302,12 @@
+ # IMPL_STRATEGY may be defined too.
+ #
+ 
 -OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
-+# OBJDIR_NAME is used to build the directory containing the built objects, for
++# 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 the solver. To make that easier
-+# in the makefile we rename this directory to "out".
++# in the makefile we rename this directory to "out". 
 +#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
 +OBJDIR_NAME = out
- endif
  
- 
-diff -ur misc/nss-3.25/nss/coreconf/rules.mk misc/build/nss-3.25/nss/coreconf/rules.mk
---- misc/nss-3.25/nss/coreconf/rules.mk	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/coreconf/rules.mk	2016-07-14 23:47:54.586736000 -0700
-@@ -322,7 +322,12 @@
+ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+ ifndef BUILD_OPT
+--- misc/nss-3.14.4/mozilla/security/coreconf/rules.mk	2009-12-08 02:33:36.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/rules.mk	2010-06-11 16:35:54.996448704 +0200
+@@ -318,7 +318,12 @@
  ifdef NS_USE_GCC
  	$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
  else
@@ -245,18 +131,49 @@ diff -ur misc/nss-3.25/nss/coreconf/rules.mk misc/build/nss-3.25/nss/coreconf/ru
  endif
  	@echo $(RES) finished
  endif
-diff -ur misc/nss-3.25/nss/lib/zlib/inflate.c misc/build/nss-3.25/nss/lib/zlib/inflate.c
---- misc/nss-3.25/nss/lib/zlib/inflate.c	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/lib/zlib/inflate.c	2016-07-14 23:47:54.598199000 -0700
-@@ -1472,9 +1472,9 @@
- {
-     struct inflate_state FAR *state;
+--- misc/nss-3.14.4/mozilla/security/nss/cmd/platlibs.mk	2010-02-04 19:59:10.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/nss/cmd/platlibs.mk	2010-06-11 16:35:55.004869805 +0200
+@@ -10,17 +10,18 @@
+ 
+ ifeq ($(OS_ARCH), SunOS) 
+ ifeq ($(USE_64), 1)
+-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
++#In AOO we would probable put the executables next to libs
++EXTRA_SHARED_LIBS += -R '$$ORIGIN'
+ else
+-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
++EXTRA_SHARED_LIBS += -R '$$ORIGIN'
+ endif
+ endif
+ 
+ ifeq ($(OS_ARCH), Linux)
+ ifeq ($(USE_64), 1)
+-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
++EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
+ else
+-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
++EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
+ endif
+ endif
+ 
+--- misc/nss-3.14.4/mozilla/security/nss/cmd/shlibsign/Makefile	2009-08-07 21:06:37.000000000 +0200
++++ misc/build/nss-3.14.4/mozilla/security/nss/cmd/shlibsign/Makefile	2010-06-11 16:35:55.009851148 +0200
+@@ -46,10 +46,15 @@
+ 
+ # sign any and all shared libraries that contain the word freebl
+ 
+-CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
+-CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
++# Signing causes loading of some system library which in turn loads
++# libsqlite3. Then it loads libsqulite3 from nss, which does not have the proper
++# version. Therefore signing fails.
++# We cannot build with the system sqlite3, because it is too old (SDK
++# 10.4). Otherwise one could set NSS_USE_SYSTEM_SQLITE=1 and use the system lib. 
++#CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
++#CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
+ ifndef NSS_DISABLE_DBM
+-CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
++#CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
+ endif
+ CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
  
--    if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
-+    if (strm == Z_NULL || strm->state == Z_NULL) return ~0UL << 16;
-     state = (struct inflate_state FAR *)strm->state;
--    return ((long)(state->back) << 16) +
-+    return ((unsigned long)(state->back) << 16) +
-         (state->mode == COPY ? state->length :
-             (state->mode == MATCH ? state->was - state->length : 0));
- }
diff --git a/nss/nss_freebsd.patch b/nss/nss_freebsd.patch
index d5cffbc..53df536 100644
--- a/nss/nss_freebsd.patch
+++ b/nss/nss_freebsd.patch
@@ -1,6 +1,5 @@
-diff -ur misc/nss-3.25/nss/coreconf/FreeBSD.mk misc/build/nss-3.25/nss/coreconf/FreeBSD.mk
---- misc/nss-3.25/nss/coreconf/FreeBSD.mk	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/coreconf/FreeBSD.mk	2016-07-14 23:50:31.177316000 -0700
+--- misc/nss-3.14.4/mozilla/security/coreconf/FreeBSD.mk	2012-05-03 09:42:51.000000000 +0000
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/FreeBSD.mk	2015-07-13 23:42:44.915864000 +0000
 @@ -5,9 +5,8 @@
  
  include $(CORE_DEPTH)/coreconf/UNIX.mk
diff --git a/nss/nss_linux.patch b/nss/nss_linux.patch
index 9d768b2..ee601bb1 100644
--- a/nss/nss_linux.patch
+++ b/nss/nss_linux.patch
@@ -1,14 +1,24 @@
-diff -ur misc/nss-3.25/nss/lib/freebl/Makefile misc/build/nss-3.25/nss/lib/freebl/Makefile
---- misc/nss-3.25/nss/lib/freebl/Makefile	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/lib/freebl/Makefile	2016-07-14 23:52:19.135925000 -0700
-@@ -153,8 +153,8 @@
-     # The Intel AES assembly code requires Visual C++ 2010.
-     # if $(_MSC_VER) >= 1600 (Visual C++ 2010)
-     ifeq ($(firstword $(sort $(_MSC_VER) 1600)),1600)
--	DEFINES += -DUSE_HW_AES -DINTEL_GCM
--	ASFILES += intel-aes-x86-masm.asm intel-gcm-x86-masm.asm
-+	#DEFINES += -DUSE_HW_AES -DINTEL_GCM
-+	#ASFILES += intel-aes-x86-masm.asm intel-gcm-x86-masm.asm
- 	EXTRA_SRCS += intel-gcm-wrap.c
- 	ifeq ($(CLANG_CL),1)
- 	    INTEL_GCM_CLANG_CL = 1
+--- misc/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2013-11-01 14:39:28.195966851 +0100
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2013-11-01 14:39:10.246610849 +0100
+@@ -131,7 +131,7 @@
+ # -ansi on platforms like Android where the system headers are C99 and do
+ # not build with -ansi.
+ STANDARDS_CFLAGS	= -D_POSIX_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE
+-OS_CFLAGS		= $(STANDARDS_CFLAGS) $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR
++OS_CFLAGS		= $(STANDARDS_CFLAGS) $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR -DHAVE_UNISTD_H
+ OS_LIBS			= $(OS_PTHREAD) -ldl -lc
+ 
+ ifdef USE_PTHREADS
+--- misc/nss-3.14.4/mozilla/security/nss/lib/freebl/Makefile	2013-01-31 02:08:59.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/nss/lib/freebl/Makefile	2014-01-10 13:57:48.000000000 +0100
+@@ -186,8 +186,8 @@
+     DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
+ #   DEFINES += -DMPI_AMD64_ADD
+     # comment the next two lines to turn off intel HW accelleration
+-    DEFINES += -DUSE_HW_AES
+-    ASFILES += intel-aes.s intel-gcm.s
++#    DEFINES += -DUSE_HW_AES
++#    ASFILES += intel-aes.s intel-gcm.s
+     EXTRA_SRCS += intel-gcm-wrap.c
+     INTEL_GCM = 1
+     MPI_SRCS += mpi_amd64.c mp_comba.c
diff --git a/nss/nss_macosx.patch b/nss/nss_macosx.patch
index 182df49..3fdf020 100644
--- a/nss/nss_macosx.patch
+++ b/nss/nss_macosx.patch
@@ -1,7 +1,18 @@
-diff -ur misc/nss-3.25/nss/lib/sqlite/config.mk misc/build/nss-3.25/nss/lib/sqlite/config.mk
---- misc/nss-3.25/nss/lib/sqlite/config.mk	2016-06-20 10:11:28.000000000 -0700
-+++ misc/build/nss-3.25/nss/lib/sqlite/config.mk	2016-07-14 23:54:14.437879000 -0700
-@@ -35,9 +35,9 @@
+--- misc/nss-3.14.4/mozilla/security/nss/Makefile	2008-12-03 00:24:39.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/nss/Makefile	2009-11-27 13:36:22.662753328 +0100
+@@ -73,6 +73,9 @@
+ ifeq ($(OS_TARGET),WIN95)
+ NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
+ endif
++ifdef MACOS_SDK_DIR
++NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR)
++endif
+ ifdef USE_DEBUG_RTL
+ NSPR_CONFIGURE_OPTS += --enable-debug-rtl
+ endif
+--- misc/nss-3.14.4/mozilla/security/nss/lib/sqlite/config.mk	2012-12-12 13:30:51.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/nss/lib/sqlite/config.mk	2013-10-31 15:45:49.000000000 +0100
+@@ -39,9 +39,9 @@
  # OSAtomicCompareAndSwapPtrBarrier, which is only available on Mac OS X 10.5
  # (Darwin 9.0) and later. Define SQLITE_WITHOUT_ZONEMALLOC to disable
  # that code for older versions of Mac OS X. See bug 820374.
@@ -12,5 +23,5 @@ diff -ur misc/nss-3.25/nss/lib/sqlite/config.mk misc/build/nss-3.25/nss/lib/sqli
 +OSX_MINOR_LT_5 := $(shell [ $(OSX_TARGET_MINOR) -lt 5 ] && echo true)
 +ifeq ($(OSX_MINOR_LT_5),true)
  OS_CFLAGS += -DSQLITE_WITHOUT_ZONEMALLOC
- endif
  endif # Darwin
+ endif
diff --git a/nss/prj/d.lst b/nss/prj/d.lst
index c33f734..5313bb5 100644
--- a/nss/prj/d.lst
+++ b/nss/prj/d.lst
@@ -6,8 +6,7 @@ mkdir: %_DEST%\inc%_EXT%\mozilla\nss
 ..\%__SRC%\inc\include\obsolete\protypes.h %_DEST%\inc%_EXT%\mozilla\nspr\obsolete\protypes.h
 ..\%__SRC%\inc\nss\*.h %_DEST%\inc%_EXT%\mozilla\nss
 
-..\%__SRC%\lib\libfreebl3.* %_DEST%\lib%_EXT%\libfreebl3.*
-..\%__SRC%\lib\libfreeblpriv3.* %_DEST%\lib%_EXT%\libfreeblpriv3.*
+..\%__SRC%\lib\libfreebl3.* %_DEST%\lib%_EXT%\libfreebl.*
 ..\%__SRC%\lib\libfreebl_32fpu_3.* %_DEST%\lib%_EXT%\libfreebl_32fpu_3.*
 ..\%__SRC%\lib\libfreebl_32int64_3.* %_DEST%\lib%_EXT%\libfreebl_32int64_3.*
 ..\%__SRC%\lib\libfreebl_32int_3.* %_DEST%\lib%_EXT%\libfreebl_32int_3.*
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 1958563..4c6bca6 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -1643,7 +1643,6 @@ SPECIAL_LIB_FILE( gid_File_Lib_AVMediaWin, avmediawin )
 #ifdef BUNDLE_NSS_LIBS
 
 STD_LIB_FILE( gid_File_Lib_Freebl3, freebl3)
-STD_LIB_FILE( gid_File_Lib_Freeblpriv3, freeblpriv3)
 STD_LIB_FILE( gid_File_Lib_Nspr4, nspr4)
 STD_LIB_FILE( gid_File_Lib_Nss3, nss3)
 STD_LIB_FILE( gid_File_Lib_Nsckbi, nssckbi)
commit afbd0ce0f42942a0dbc60c2374053de6a4d544f5
Author: Don Lewis <truckman at apache.org>
Date:   Mon Jul 18 06:42:40 2016 +0000

    Ps-3.14.4-with-nspr-4.9.5 has many security
    vulnerabilities
    
    Upgrade bundled nss-3.14.4-with-nspr-4.9.5 to nss-3.25-with-nspr-4.12.
    These CVEs have been fixed since nss-3.14.4 was released:
    CVE-2014-1533
    CVE-2014-1534
    CVE-2014-1536
    CVE-2014-1537
    CVE-2014-1540
    CVE-2014-1541
    CVE-2014-1542
    CVE-2014-1543
    CVE-2014-1544
    CVE-2014-1545
    CVE-2014-1547
    CVE-2014-1548
    CVE-2014-1549
    CVE-2014-1550
    CVE-2014-1551
    CVE-2014-1552
    CVE-2014-1555
    CVE-2014-1556
    CVE-2014-1557
    CVE-2014-1558
    CVE-2014-1559
    CVE-2014-1560
    CVE-2014-1561
    CVE-2014-1568
    CVE-2014-1569
    CVE-2014-1587
    CVE-2014-1588
    CVE-2014-1589
    CVE-2014-1590
    CVE-2014-1591
    CVE-2014-1592
    CVE-2014-1593
    CVE-2014-1594
    CVE-2014-1595
    CVE-2015-4513
    CVE-2015-4514
    CVE-2015-4515
    CVE-2015-4518
    CVE-2015-7181
    CVE-2015-7182
    CVE-2015-7183
    CVE-2015-7185
    CVE-2015-7186
    CVE-2015-7187
    CVE-2015-7188
    CVE-2015-7189
    CVE-2015-7190
    CVE-2015-7191
    CVE-2015-7192
    CVE-2015-7193
    CVE-2015-7194
    CVE-2015-7195
    CVE-2015-7196
    CVE-2015-7197
    CVE-2015-7198
    CVE-2015-7199
    CVE-2015-7200
    CVE-2015-7575
    CVE-2016-1938
    CVE-2016-1950
    CVE-2016-1978
    CVE-2016-1979
    Whether any of these actually impacts OpenOffice is not known.
    
    Rebase the nss patches to the new version and move any non-conflicting
    changes from the platform-specific patch files to nss.patch.  The
    nss.patch.mingw file was already out of date and was not updated.
    
    Disable nss tests which require at least partial c++11 (-stdc++0x)
    support because they use nullptr.  This reportedly requires at least
    gcc 4.6, which is newer that some of what is provided by some of
    our supported platforms.
    
    Fix build issue on FreeBSD 11.0 and other platforms with picky compilers.
    The result of shifting a negative signed value is undefined in C and C++.
    The generated code does the expected thing in my experience and this
    construct just generates a compiler warning, but
    nss-3.24/nss/lib/zlib/inflate.c is compiled with -Werror, which breaks
    the build.  Fix the issue by doing the calculations using the equivalent
    unsigned type.  The function return should probably also be changed, but
    that is more invasive.
    
    Patch pratom.h to no include <intrin.H> inside an extern "C" block
    because it breaks the build on Windows.
    
    Recent versions of nss include a new shared library, libfreeblpriv3.so,
    so package it so that it gets installed.
    
    Temporarily change nss download URL from https to http to avoid breaking
    bootstrap on the buildbots.

diff --git a/external_deps.lst b/external_deps.lst
index 6d85e10..ae6cc38 100644
--- a/external_deps.lst
+++ b/external_deps.lst
@@ -313,9 +313,9 @@ if (ENABLE_CATEGORY_B==YES && SOLAR_JAVA==TRUE && ENABLE_JAVASCRIPT==YES)
     URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
 
 if (ENABLE_CATEGORY_B==YES && ENABLE_NSS_MODULE==YES)
-    MD5 = 067a04150b1d8b64f7da3019688a7547
-    name = nss-3.14.4-with-nspr-4.9.5.tar.gz
-    URL1 = https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_14_4_RTM/src/$(name)
+    MD5 = 4ec9a36c0f7c9360b149491c013b8d50
+    name = nss-3.25-with-nspr-4.12.tar.gz
+    URL1 = http://ftp.mozilla.org/pub/security/nss/releases/NSS_3_25_RTM/src/$(name)
     URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
 
 if (ENABLE_CATEGORY_B==YES && SYSTEM_SAXON!=YES && DISABLE_SAXON!=YES && SOLAR_JAVA==TRUE)
diff --git a/nss/makefile.mk b/nss/makefile.mk
index c14dc47..5d7ee14 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -39,9 +39,9 @@ all:
 
 .ELSE
 
-TARFILE_NAME=nss-3.14.4-with-nspr-4.9.5
-TARFILE_MD5=067a04150b1d8b64f7da3019688a7547
-TARFILE_ROOTDIR=nss-3.14.4
+TARFILE_NAME=nss-3.25-with-nspr-4.12
+TARFILE_MD5=4ec9a36c0f7c9360b149491c013b8d50
+TARFILE_ROOTDIR=nss-3.25
 PATCH_FILES=nss.patch
 
 .IF "$(OS)"=="MACOSX"
@@ -50,10 +50,6 @@ MACOS_SDK_DIR=$(SDK_PATH)
 PATCH_FILES+=nss_macosx.patch
 .ENDIF # "$(OS)"=="MACOSX"
 
-.IF "$(OS)"=="FREEBSD"
-PATCH_FILES+=nss_freebsd.patch
-.ENDIF
-
 .IF "$(debug)" != ""
 .ELSE
 BUILD_OPT=1
@@ -66,16 +62,20 @@ USE_64:=1
 .EXPORT : USE_64
 .ENDIF # "$(BUILD64)"=="1"
 
-OUT2LIB=mozilla$/dist$/out$/lib$/*$(DLLPOST)
+OUT2LIB=dist$/out$/lib$/*$(DLLPOST)
 
-BUILD_DIR=mozilla$/security$/nss
+BUILD_DIR=nss
 BUILD_ACTION= $(GNUMAKE) nss_build_all
 #See #i105566# && moz#513024#
 .IF "$(OS)"=="LINUX"
-BUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1
+BUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1 NSS_DISABLE_GTESTS=1
 PATCH_FILES+=nss_linux.patch
 .ENDIF
 
+.IF "$(OS)"=="FREEBSD"
+BUILD_ACTION+=FREEBL_LOWHASH=1 NSS_DISABLE_GTESTS=1
+.ENDIF
+
 
 .IF "$(GUI)"=="WNT"
 
@@ -99,20 +99,20 @@ nss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
 .ENDIF
 
 
-BUILD_DIR=mozilla$/security$/nss
-BUILD_ACTION=NS_USE_GCC=1 CC="$(nss_CC)" CXX="$(nss_CXX)" OS_LIBS="$(nss_LIBS)" OS_TARGET=WIN95 _WIN32_IE=0x500 PATH="$(PATH)" DEFINES=-D_WIN32_IE=0x500 $(GNUMAKE) nss_build_all
+BUILD_DIR=nss
+BUILD_ACTION= NSS_DISABLE_GTESTS=1 NS_USE_GCC=1 CC="$(nss_CC)" CXX="$(nss_CXX)" OS_LIBS="$(nss_LIBS)" OS_TARGET=WIN95 _WIN32_IE=0x500 PATH="$(PATH)" DEFINES=-D_WIN32_IE=0x500 $(GNUMAKE) nss_build_all
 
 OUT2LIB= \
-    mozilla$/dist$/out$/lib$/libnspr4.a \
-    mozilla$/dist$/out$/lib$/libnss3.a \
-    mozilla$/dist$/out$/lib$/libnssdbm3.a \
-    mozilla$/dist$/out$/lib$/libnssutil3.a \
-    mozilla$/dist$/out$/lib$/libplc4.a \
-    mozilla$/dist$/out$/lib$/libplds4.a \
-    mozilla$/dist$/out$/lib$/libsmime3.a \
-    mozilla$/dist$/out$/lib$/libsoftokn3.a \
-    mozilla$/dist$/out$/lib$/libsqlite3.a \
-    mozilla$/dist$/out$/lib$/libssl3.a
+    dist$/out$/lib$/libnspr4.a \
+    dist$/out$/lib$/libnss3.a \
+    dist$/out$/lib$/libnssdbm3.a \
+    dist$/out$/lib$/libnssutil3.a \
+    dist$/out$/lib$/libplc4.a \
+    dist$/out$/lib$/libplds4.a \
+    dist$/out$/lib$/libsmime3.a \
+    dist$/out$/lib$/libsoftokn3.a \
+    dist$/out$/lib$/libsqlite3.a \
+    dist$/out$/lib$/libssl3.a
 
 .ELSE			# "$(COM)"=="GCC"
 MOZ_MSVCVERSION= 9
@@ -130,30 +130,30 @@ OS_TARGET=WIN95
 EXT_USE_STLPORT=TRUE
 
 #To build nss one has to call "make nss_build_all" in 
-#mozilla/security/nss
-NSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/mozilla/security/nss)
+#nss
+NSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/nss)
 BUILD_ACTION= PATH="$(PATH):$(moz_build)/msys/bin:$(moz_build)/moztools/bin" && $(subst,/,$/ $(MOZILLABUILD)/msys/bin/bash) -i \
-    -c "cd $(NSS_BUILD_DIR) && make nss_build_all"
+    -c "cd $(NSS_BUILD_DIR) && make nss_build_all NSS_DISABLE_GTESTS=1"
 
 OUT2LIB= \
-    mozilla$/dist$/out$/lib$/nspr4.lib \
-    mozilla$/dist$/out$/lib$/nss3.lib \
-    mozilla$/dist$/out$/lib$/nssdbm3.lib \
-    mozilla$/dist$/out$/lib$/nssutil3.lib \
-    mozilla$/dist$/out$/lib$/plc4.lib \
-    mozilla$/dist$/out$/lib$/plds4.lib \
-    mozilla$/dist$/out$/lib$/smime3.lib \
-    mozilla$/dist$/out$/lib$/softokn3.lib \
-    mozilla$/dist$/out$/lib$/sqlite3.lib \
-    mozilla$/dist$/out$/lib$/ssl3.lib
+    dist$/out$/lib$/nspr4.lib \
+    dist$/out$/lib$/nss3.lib \
+    dist$/out$/lib$/nssdbm3.lib \
+    dist$/out$/lib$/nssutil3.lib \
+    dist$/out$/lib$/plc4.lib \
+    dist$/out$/lib$/plds4.lib \
+    dist$/out$/lib$/smime3.lib \
+    dist$/out$/lib$/softokn3.lib \
+    dist$/out$/lib$/sqlite3.lib \
+    dist$/out$/lib$/ssl3.lib
 
 .ENDIF			# "$(COM)"=="GCC"
 
-OUT2BIN=mozilla$/dist$/out$/lib$/*$(DLLPOST)
+OUT2BIN=dist$/out$/lib$/*$(DLLPOST)
 .ENDIF			# "$(GUI)"=="WNT"
 
 
-OUTDIR2INC=mozilla$/dist$/public$/nss mozilla$/dist$/out$/include
+OUTDIR2INC=dist$/public$/nss dist$/out$/include
 
 # --- Targets ------------------------------------------------------
 
diff --git a/nss/nss.patch b/nss/nss.patch
old mode 100755
new mode 100644
index d27de91..5caa67b
--- a/nss/nss.patch
+++ b/nss/nss.patch
@@ -1,6 +1,7 @@
---- misc/nss-3.14.4/mozilla/nsprpub/config/rules.mk	2009-12-09 22:24:37.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/nsprpub/config/rules.mk	2010-06-11 16:35:54.946870871 +0200
-@@ -377,7 +377,12 @@
+diff -ur misc/nss-3.25/nspr/config/rules.mk misc/build/nss-3.25/nspr/config/rules.mk
+--- misc/nss-3.25/nspr/config/rules.mk	2016-02-12 05:51:25.000000000 -0800
++++ misc/build/nss-3.25/nspr/config/rules.mk	2016-07-14 23:47:54.492034000 -0700
+@@ -382,7 +382,12 @@
  ifdef NS_USE_GCC
  	$(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
  else
@@ -14,9 +15,10 @@
  endif # GCC
  	@echo $(RES) finished
  endif
---- misc/nss-3.14.4/mozilla/nsprpub/configure	2010-02-08 19:41:35.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/nsprpub/configure	2010-06-11 16:35:54.960188991 +0200
-@@ -4443,7 +4443,7 @@
+diff -ur misc/nss-3.25/nspr/configure misc/build/nss-3.25/nspr/configure
+--- misc/nss-3.25/nspr/configure	2016-02-12 05:51:25.000000000 -0800
++++ misc/build/nss-3.25/nspr/configure	2016-07-14 23:47:54.531323000 -0700
+@@ -6992,7 +6992,7 @@
      PR_MD_CSRCS=linux.c
      MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
      DSO_CFLAGS=-fPIC
@@ -25,11 +27,86 @@
      _OPTIMIZE_FLAGS=-O2
      _DEBUG_FLAGS="-g -fno-inline"  # most people on linux use gcc/gdb, and that
                                     # combo is not yet good at debugging inlined
---- misc/nss-3.14.4/mozilla/security/coreconf/Darwin.mk	2010-02-04 19:59:10.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/Darwin.mk	2010-06-11 16:35:54.966185975 +0200
-@@ -5,10 +5,12 @@
+diff -ur misc/nss-3.25/nspr/pr/include/pratom.h misc/build/nss-3.25/nspr/pr/include/pratom.h
+--- misc/nss-3.25/nspr/pr/include/pratom.h	2016-02-12 05:51:25.000000000 -0800
++++ misc/build/nss-3.25/nspr/pr/include/pratom.h	2016-07-14 23:47:54.538325000 -0700
+@@ -81,7 +81,9 @@
+ #if defined(_WIN32) && !defined(_WIN32_WCE) && \
+     (!defined(_MSC_VER) || (_MSC_VER >= 1310))
  
++PR_END_EXTERN_C
+ #include <intrin.h>
++PR_BEGIN_EXTERN_C
+ 
+ #ifdef _MSC_VER
+ #pragma intrinsic(_InterlockedIncrement)
+diff -ur misc/nss-3.25/nss/Makefile misc/build/nss-3.25/nss/Makefile
+--- misc/nss-3.25/nss/Makefile	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/Makefile	2016-07-14 23:47:54.544021000 -0700
+@@ -76,6 +76,9 @@
+ ifeq ($(OS_TARGET),WIN95)
+ NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
+ endif
++ifdef MACOS_SDK_DIR
++NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR)
++endif
+ ifdef USE_DEBUG_RTL
+ NSPR_CONFIGURE_OPTS += --enable-debug-rtl
+ endif
+diff -ur misc/nss-3.25/nss/cmd/platlibs.mk misc/build/nss-3.25/nss/cmd/platlibs.mk
+--- misc/nss-3.25/nss/cmd/platlibs.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/cmd/platlibs.mk	2016-07-14 23:47:54.549839000 -0700
+@@ -10,17 +10,18 @@
+ 
+ ifeq ($(OS_ARCH), SunOS) 
+ ifeq ($(USE_64), 1)
+-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
++#In AOO we would probable put the executables next to libs
++EXTRA_SHARED_LIBS += -R '$$ORIGIN'
+ else
+-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
++EXTRA_SHARED_LIBS += -R '$$ORIGIN'
+ endif
+ endif
+ 
+ ifeq ($(OS_ARCH), Linux)
+ ifeq ($(USE_64), 1)
+-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
++EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
+ else
+-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
++EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
+ endif
+ endif
+ 
+diff -ur misc/nss-3.25/nss/cmd/shlibsign/Makefile misc/build/nss-3.25/nss/cmd/shlibsign/Makefile
+--- misc/nss-3.25/nss/cmd/shlibsign/Makefile	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/cmd/shlibsign/Makefile	2016-07-14 23:47:54.554784000 -0700
+@@ -49,10 +49,15 @@
+ CHECKLIBS =
+ CHECKLOC =
+ else
+-CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
+-CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
++# Signing causes loading of some system library which in turn loads
++# libsqlite3. Then it loads libsqulite3 from nss, which does not have the proper
++# version. Therefore signing fails.
++# We cannot build with the system sqlite3, because it is too old (SDK
++# 10.4). Otherwise one could set NSS_USE_SYSTEM_SQLITE=1 and use the system lib.
++#CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
++#CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
+ ifndef NSS_DISABLE_DBM
+-CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
++#CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
+ endif
+ CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
+ 
+diff -ur misc/nss-3.25/nss/coreconf/Darwin.mk misc/build/nss-3.25/nss/coreconf/Darwin.mk
+--- misc/nss-3.25/nss/coreconf/Darwin.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/Darwin.mk	2016-07-14 23:47:54.560325000 -0700
+@@ -6,10 +6,12 @@
  include $(CORE_DEPTH)/coreconf/UNIX.mk
+ include $(CORE_DEPTH)/coreconf/Werror.mk
  
 -DEFAULT_COMPILER = gcc
 +DEFAULT_COMPILER = cc
@@ -43,8 +120,33 @@
  RANLIB		= ranlib
  
  ifndef CPU_ARCH
---- misc/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2010-01-15 23:19:00.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2010-06-11 16:35:54.981151732 +0200
+diff -ur misc/nss-3.25/nss/coreconf/FreeBSD.mk misc/build/nss-3.25/nss/coreconf/FreeBSD.mk
+--- misc/nss-3.25/nss/coreconf/FreeBSD.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/FreeBSD.mk	2016-07-14 23:47:54.564724000 -0700
+@@ -5,9 +5,8 @@
+ 
+ include $(CORE_DEPTH)/coreconf/UNIX.mk
+ 
+-DEFAULT_COMPILER	= gcc
+-CC			= gcc
+-CCC			= g++
++DEFAULT_COMPILER	= $(CC)
++CCC			= $(CXX)
+ RANLIB			= ranlib
+ 
+ CPU_ARCH		= $(OS_TEST)
+@@ -21,7 +20,7 @@
+ CPU_ARCH		= x86_64
+ endif
+ 
+-OS_CFLAGS		= $(DSO_CFLAGS) -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
++OS_CFLAGS		= $(DSO_CFLAGS) -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_UNISTD_H -DHAVE_BSD_FLOCK
+ 
+ DSO_CFLAGS		= -fPIC
+ DSO_LDOPTS		= -shared -Wl,-soname -Wl,$(notdir $@)
+diff -ur misc/nss-3.25/nss/coreconf/Linux.mk misc/build/nss-3.25/nss/coreconf/Linux.mk
+--- misc/nss-3.25/nss/coreconf/Linux.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/Linux.mk	2016-07-14 23:47:54.569918000 -0700
 @@ -16,8 +16,11 @@
  	IMPL_STRATEGY = _PTH
  endif
@@ -59,16 +161,25 @@
  RANLIB			= ranlib
  
  DEFAULT_COMPILER = gcc
-@@ -143,7 +146,7 @@
+@@ -139,7 +142,7 @@
+ OS_PTHREAD = -lpthread 
+ endif
+ 
+-OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR
++OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR -DHAVE_UNISTD_H
+ OS_LIBS			= $(OS_PTHREAD) -ldl -lc
+ 
+ ifdef USE_PTHREADS
+@@ -149,7 +152,7 @@
+ ARCH			= linux
+ 
+ DSO_CFLAGS		= -fPIC
+-DSO_LDOPTS		= -shared $(ARCHFLAG) -Wl,--gc-sections
++DSO_LDOPTS		= -shared $(ARCHFLAG) -Wl,--gc-sections '-Wl,-rpath,$$ORIGIN'
+ # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
  # incorrectly reports undefined references in the libraries we link with, so
  # we don't use -z defs there.
- ZDEFS_FLAG		= -Wl,-z,defs
--DSO_LDOPTS		+= $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
-+DSO_LDOPTS		+= $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) '-Wl,-rpath,$$ORIGIN'
- LDFLAGS			+= $(ARCHFLAG)
- 
- # On Maemo, we need to use the -rpath-link flag for even the standard system
-@@ -174,8 +177,13 @@
+@@ -189,8 +192,13 @@
  endif
  endif
  
@@ -82,8 +193,9 @@
  
  # The -rpath '$$ORIGIN' linker option instructs this library to search for its
  # dependencies in the same directory where it resides.
---- misc/nss-3.14.4/mozilla/security/coreconf/SunOS5.mk	2009-06-11 02:55:32.000000000 +0200
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/SunOS5.mk	2010-06-11 16:35:54.985571182 +0200
+diff -ur misc/nss-3.25/nss/coreconf/SunOS5.mk misc/build/nss-3.25/nss/coreconf/SunOS5.mk
+--- misc/nss-3.25/nss/coreconf/SunOS5.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/SunOS5.mk	2016-07-14 23:47:54.575211000 -0700
 @@ -48,8 +48,12 @@
  	    # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
  	endif
@@ -99,25 +211,27 @@
  	ASFLAGS   += -Wa,-P
  	OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
  	ifndef BUILD_OPT
---- misc/nss-3.14.4/mozilla/security/coreconf/arch.mk	2009-06-05 04:14:49.000000000 +0200
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/arch.mk	2010-06-11 16:35:54.990913282 +0200
-@@ -302,7 +302,12 @@
- # IMPL_STRATEGY may be defined too.
- #
- 
+diff -ur misc/nss-3.25/nss/coreconf/arch.mk misc/build/nss-3.25/nss/coreconf/arch.mk
+--- misc/nss-3.25/nss/coreconf/arch.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/arch.mk	2016-07-14 23:47:54.579901000 -0700
+@@ -294,7 +294,12 @@
+ 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
-+# OBJDIR_NAME is used to build the directory containing the built objects, for 
++# 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 the solver. To make that easier
-+# in the makefile we rename this directory to "out". 
++# in the makefile we rename this directory to "out".
 +#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
 +OBJDIR_NAME = out
+ endif
  
- ifeq (,$(filter-out WIN%,$(OS_TARGET)))
- ifndef BUILD_OPT
---- misc/nss-3.14.4/mozilla/security/coreconf/rules.mk	2009-12-08 02:33:36.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/rules.mk	2010-06-11 16:35:54.996448704 +0200
-@@ -318,7 +318,12 @@
+ 
+diff -ur misc/nss-3.25/nss/coreconf/rules.mk misc/build/nss-3.25/nss/coreconf/rules.mk
+--- misc/nss-3.25/nss/coreconf/rules.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/rules.mk	2016-07-14 23:47:54.586736000 -0700
+@@ -322,7 +322,12 @@
  ifdef NS_USE_GCC
  	$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
  else
@@ -131,49 +245,18 @@
  endif
  	@echo $(RES) finished
  endif
---- misc/nss-3.14.4/mozilla/security/nss/cmd/platlibs.mk	2010-02-04 19:59:10.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/nss/cmd/platlibs.mk	2010-06-11 16:35:55.004869805 +0200
-@@ -10,17 +10,18 @@
- 
- ifeq ($(OS_ARCH), SunOS) 
- ifeq ($(USE_64), 1)
--EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
-+#In AOO we would probable put the executables next to libs
-+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
- else
--EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
-+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
- endif
- endif
- 
- ifeq ($(OS_ARCH), Linux)
- ifeq ($(USE_64), 1)
--EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
-+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
- else
--EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
-+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
- endif
- endif
- 
---- misc/nss-3.14.4/mozilla/security/nss/cmd/shlibsign/Makefile	2009-08-07 21:06:37.000000000 +0200
-+++ misc/build/nss-3.14.4/mozilla/security/nss/cmd/shlibsign/Makefile	2010-06-11 16:35:55.009851148 +0200
-@@ -46,10 +46,15 @@
- 
- # sign any and all shared libraries that contain the word freebl
- 
--CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
--CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
-+# Signing causes loading of some system library which in turn loads
-+# libsqlite3. Then it loads libsqulite3 from nss, which does not have the proper
-+# version. Therefore signing fails.
-+# We cannot build with the system sqlite3, because it is too old (SDK
-+# 10.4). Otherwise one could set NSS_USE_SYSTEM_SQLITE=1 and use the system lib. 
-+#CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
-+#CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
- ifndef NSS_DISABLE_DBM
--CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
-+#CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
- endif
- CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
+diff -ur misc/nss-3.25/nss/lib/zlib/inflate.c misc/build/nss-3.25/nss/lib/zlib/inflate.c
+--- misc/nss-3.25/nss/lib/zlib/inflate.c	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/lib/zlib/inflate.c	2016-07-14 23:47:54.598199000 -0700
+@@ -1472,9 +1472,9 @@
+ {
+     struct inflate_state FAR *state;
  
+-    if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
++    if (strm == Z_NULL || strm->state == Z_NULL) return ~0UL << 16;
+     state = (struct inflate_state FAR *)strm->state;
+-    return ((long)(state->back) << 16) +
++    return ((unsigned long)(state->back) << 16) +
+         (state->mode == COPY ? state->length :
+             (state->mode == MATCH ? state->was - state->length : 0));
+ }
diff --git a/nss/nss_freebsd.patch b/nss/nss_freebsd.patch
index 53df536..d5cffbc 100644
--- a/nss/nss_freebsd.patch
+++ b/nss/nss_freebsd.patch
@@ -1,5 +1,6 @@
---- misc/nss-3.14.4/mozilla/security/coreconf/FreeBSD.mk	2012-05-03 09:42:51.000000000 +0000
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/FreeBSD.mk	2015-07-13 23:42:44.915864000 +0000
+diff -ur misc/nss-3.25/nss/coreconf/FreeBSD.mk misc/build/nss-3.25/nss/coreconf/FreeBSD.mk
+--- misc/nss-3.25/nss/coreconf/FreeBSD.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/coreconf/FreeBSD.mk	2016-07-14 23:50:31.177316000 -0700
 @@ -5,9 +5,8 @@
  
  include $(CORE_DEPTH)/coreconf/UNIX.mk
diff --git a/nss/nss_linux.patch b/nss/nss_linux.patch
index ee601bb1..9d768b2 100644
--- a/nss/nss_linux.patch
+++ b/nss/nss_linux.patch
@@ -1,24 +1,14 @@
---- misc/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2013-11-01 14:39:28.195966851 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2013-11-01 14:39:10.246610849 +0100
-@@ -131,7 +131,7 @@
- # -ansi on platforms like Android where the system headers are C99 and do
- # not build with -ansi.
- STANDARDS_CFLAGS	= -D_POSIX_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE
--OS_CFLAGS		= $(STANDARDS_CFLAGS) $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR
-+OS_CFLAGS		= $(STANDARDS_CFLAGS) $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR -DHAVE_UNISTD_H
- OS_LIBS			= $(OS_PTHREAD) -ldl -lc
- 
- ifdef USE_PTHREADS
---- misc/nss-3.14.4/mozilla/security/nss/lib/freebl/Makefile	2013-01-31 02:08:59.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/nss/lib/freebl/Makefile	2014-01-10 13:57:48.000000000 +0100
-@@ -186,8 +186,8 @@
-     DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
- #   DEFINES += -DMPI_AMD64_ADD
-     # comment the next two lines to turn off intel HW accelleration
--    DEFINES += -DUSE_HW_AES
--    ASFILES += intel-aes.s intel-gcm.s
-+#    DEFINES += -DUSE_HW_AES
-+#    ASFILES += intel-aes.s intel-gcm.s
-     EXTRA_SRCS += intel-gcm-wrap.c
-     INTEL_GCM = 1
-     MPI_SRCS += mpi_amd64.c mp_comba.c
+diff -ur misc/nss-3.25/nss/lib/freebl/Makefile misc/build/nss-3.25/nss/lib/freebl/Makefile
+--- misc/nss-3.25/nss/lib/freebl/Makefile	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/lib/freebl/Makefile	2016-07-14 23:52:19.135925000 -0700
+@@ -153,8 +153,8 @@
+     # The Intel AES assembly code requires Visual C++ 2010.
+     # if $(_MSC_VER) >= 1600 (Visual C++ 2010)
+     ifeq ($(firstword $(sort $(_MSC_VER) 1600)),1600)
+-	DEFINES += -DUSE_HW_AES -DINTEL_GCM
+-	ASFILES += intel-aes-x86-masm.asm intel-gcm-x86-masm.asm
++	#DEFINES += -DUSE_HW_AES -DINTEL_GCM
++	#ASFILES += intel-aes-x86-masm.asm intel-gcm-x86-masm.asm
+ 	EXTRA_SRCS += intel-gcm-wrap.c
+ 	ifeq ($(CLANG_CL),1)
+ 	    INTEL_GCM_CLANG_CL = 1
diff --git a/nss/nss_macosx.patch b/nss/nss_macosx.patch
index 3fdf020..182df49 100644
--- a/nss/nss_macosx.patch
+++ b/nss/nss_macosx.patch
@@ -1,18 +1,7 @@
---- misc/nss-3.14.4/mozilla/security/nss/Makefile	2008-12-03 00:24:39.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/nss/Makefile	2009-11-27 13:36:22.662753328 +0100
-@@ -73,6 +73,9 @@
- ifeq ($(OS_TARGET),WIN95)
- NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
- endif
-+ifdef MACOS_SDK_DIR
-+NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR)
-+endif
- ifdef USE_DEBUG_RTL
- NSPR_CONFIGURE_OPTS += --enable-debug-rtl
- endif
---- misc/nss-3.14.4/mozilla/security/nss/lib/sqlite/config.mk	2012-12-12 13:30:51.000000000 +0100
-+++ misc/build/nss-3.14.4/mozilla/security/nss/lib/sqlite/config.mk	2013-10-31 15:45:49.000000000 +0100
-@@ -39,9 +39,9 @@
+diff -ur misc/nss-3.25/nss/lib/sqlite/config.mk misc/build/nss-3.25/nss/lib/sqlite/config.mk
+--- misc/nss-3.25/nss/lib/sqlite/config.mk	2016-06-20 10:11:28.000000000 -0700
++++ misc/build/nss-3.25/nss/lib/sqlite/config.mk	2016-07-14 23:54:14.437879000 -0700
+@@ -35,9 +35,9 @@
  # OSAtomicCompareAndSwapPtrBarrier, which is only available on Mac OS X 10.5
  # (Darwin 9.0) and later. Define SQLITE_WITHOUT_ZONEMALLOC to disable
  # that code for older versions of Mac OS X. See bug 820374.
@@ -23,5 +12,5 @@
 +OSX_MINOR_LT_5 := $(shell [ $(OSX_TARGET_MINOR) -lt 5 ] && echo true)
 +ifeq ($(OSX_MINOR_LT_5),true)
  OS_CFLAGS += -DSQLITE_WITHOUT_ZONEMALLOC
- endif # Darwin
  endif
+ endif # Darwin
diff --git a/nss/prj/d.lst b/nss/prj/d.lst
index 5313bb5..c33f734 100644
--- a/nss/prj/d.lst
+++ b/nss/prj/d.lst
@@ -6,7 +6,8 @@ mkdir: %_DEST%\inc%_EXT%\mozilla\nss
 ..\%__SRC%\inc\include\obsolete\protypes.h %_DEST%\inc%_EXT%\mozilla\nspr\obsolete\protypes.h
 ..\%__SRC%\inc\nss\*.h %_DEST%\inc%_EXT%\mozilla\nss
 
-..\%__SRC%\lib\libfreebl3.* %_DEST%\lib%_EXT%\libfreebl.*
+..\%__SRC%\lib\libfreebl3.* %_DEST%\lib%_EXT%\libfreebl3.*
+..\%__SRC%\lib\libfreeblpriv3.* %_DEST%\lib%_EXT%\libfreeblpriv3.*
 ..\%__SRC%\lib\libfreebl_32fpu_3.* %_DEST%\lib%_EXT%\libfreebl_32fpu_3.*
 ..\%__SRC%\lib\libfreebl_32int64_3.* %_DEST%\lib%_EXT%\libfreebl_32int64_3.*
 ..\%__SRC%\lib\libfreebl_32int_3.* %_DEST%\lib%_EXT%\libfreebl_32int_3.*
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 4c6bca6..1958563 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -1643,6 +1643,7 @@ SPECIAL_LIB_FILE( gid_File_Lib_AVMediaWin, avmediawin )
 #ifdef BUNDLE_NSS_LIBS
 
 STD_LIB_FILE( gid_File_Lib_Freebl3, freebl3)
+STD_LIB_FILE( gid_File_Lib_Freeblpriv3, freeblpriv3)
 STD_LIB_FILE( gid_File_Lib_Nspr4, nspr4)
 STD_LIB_FILE( gid_File_Lib_Nss3, nss3)
 STD_LIB_FILE( gid_File_Lib_Nsckbi, nssckbi)


More information about the Libreoffice-commits mailing list