summaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-10-30 12:47:16 +0100
committerDavid Tardon <dtardon@redhat.com>2012-10-30 15:25:19 +0100
commit9da51784c9cdafb274579c1dac9a9b28b9b80a0c (patch)
treeee8e3ad3b6e205997c547ce404850fa4877cf400 /nss
parent562c486349ed679802ca334b71b74c7a0f91987f (diff)
fix mingw build of nss
Change-Id: Ic3bcc1297cde1c0680637d02c0e60528d2e60e52
Diffstat (limited to 'nss')
-rw-r--r--nss/makefile.mk34
-rw-r--r--nss/nsinstall.py159
-rw-r--r--nss/nspr-4.9-build.patch284
-rw-r--r--nss/nss-3.13.3-build.patch259
-rw-r--r--[-rwxr-xr-x]nss/nss.patch.mingw279
5 files changed, 843 insertions, 172 deletions
diff --git a/nss/makefile.mk b/nss/makefile.mk
index 7e27b93a75ab..db9767ad9718 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -164,7 +164,11 @@ BUILD_ACTION += NSS_USE_SYSTEM_SQLITE=1
.IF "$(COM)"=="GCC"
-PATCH_FILES+=nss.patch.mingw
+PATCH_FILES += \
+ nspr-4.9-build.patch \
+ nss-3.13.3-build.patch \
+ nss.patch.mingw \
+
PATH!:=$(MOZILLABUILD)/bin:$(PATH)
@@ -175,25 +179,29 @@ nss_CC+=-shared-libgcc
nss_CXX+=-shared-libgcc
.ENDIF
-nss_LIBS=
+nss_LIBS=-ladvapi32 -lws2_32 -lmswsock -lwinmm
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
nss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
+nss_LDFLAGS=
+
+OS_TARGET=WINNT
+.EXPORT : OS_TARGET
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_ACTION=$(GNUMAKE) NS_USE_GCC=1 CC="$(nss_CC)" CXX="$(nss_CXX)" OS_LIBS="$(nss_LIBS)" PATH="$(PATH)" NSPR_CONFIGURE_OPTS="--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --enable-shared --disable-static" LDFLAGS="$(nss_LDFLAGS)" RANLIB="$(RANLIB)" RC="$(WINDRES)" OS_RELEASE=5.0 NSINSTALL="$(PYTHON_FOR_BUILD) $(SRC_ROOT)/nss/nsinstall.py" IMPORT_LIB_SUFFIX=dll.a 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
+ mozilla/nsprpub/out/pr/src/libnspr4.dll.a \
+ mozilla/dist/out/lib/libnss3.dll.a \
+ mozilla/dist/out/lib/libnssdbm3.dll.a \
+ mozilla/dist/out/lib/libnssutil3.dll.a \
+ mozilla/nsprpub/out/lib/libc/src/libplc4.dll.a \
+ mozilla/nsprpub/out/lib/ds/libplds4.dll.a \
+ mozilla/dist/out/lib/libsmime3.dll.a \
+ mozilla/dist/out/lib/libsoftokn3.dll.a \
+ mozilla/dist/out/lib/libsqlite3.dll.a \
+ mozilla/dist/out/lib/libssl3.dll.a
.ELSE # "$(COM)"=="GCC"
MOZ_MSVCVERSION= 9
diff --git a/nss/nsinstall.py b/nss/nsinstall.py
new file mode 100644
index 000000000000..3a69c56f8ff5
--- /dev/null
+++ b/nss/nsinstall.py
@@ -0,0 +1,159 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation.
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Axel Hecht <axel@pike.org>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# This is a partial python port of nsinstall.
+# It's intended to be used when there's no natively compile nsinstall
+# available, and doesn't intend to be fully equivalent.
+# Its major use is for l10n repackaging on systems that don't have
+# a full build environment set up.
+# The basic limitation is, it doesn't even try to link and ignores
+# all related options.
+
+from optparse import OptionParser
+import os
+import os.path
+import sys
+import shutil
+
+def nsinstall(argv):
+ usage = "usage: %prog [options] arg1 [arg2 ...] target-directory"
+ p = OptionParser(usage=usage)
+
+ p.add_option('-D', action="store_true",
+ help="Create a single directory only")
+ p.add_option('-t', action="store_true",
+ help="Preserve time stamp")
+ p.add_option('-m', action="store",
+ help="Set mode", metavar="mode")
+ p.add_option('-d', action="store_true",
+ help="Create directories in target")
+ p.add_option('-R', action="store_true",
+ help="Use relative symbolic links (ignored)")
+ p.add_option('-l', action="store_true",
+ help="Create link (ignored)")
+ p.add_option('-L', action="store", metavar="linkprefix",
+ help="Link prefix (ignored)")
+
+ # The remaining arguments are not used in our tree, thus they're not
+ # implented.
+ def BadArg(option, opt, value, parser):
+ parser.error('option not supported: %s' % opt)
+
+ p.add_option('-C', action="callback", metavar="CWD",
+ callback=BadArg,
+ help="NOT SUPPORTED")
+ p.add_option('-o', action="callback", callback=BadArg,
+ help="Set owner (NOT SUPPORTED)", metavar="owner")
+ p.add_option('-g', action="callback", callback=BadArg,
+ help="Set group (NOT SUPPORTED)", metavar="group")
+
+ (options, args) = p.parse_args(argv)
+
+ if options.m:
+ # mode is specified
+ try:
+ options.m = int(options.m, 8)
+ except:
+ sys.stderr.write('nsinstall: ' + options.m + ' is not a valid mode\n')
+ return 1
+
+ # just create one directory?
+ if options.D:
+ if len(args) != 1:
+ return 1
+ if os.path.exists(args[0]):
+ if not os.path.isdir(args[0]):
+ sys.stderr.write('nsinstall: ' + args[0] + ' is not a directory\n')
+ sys.exit(1)
+ if options.m:
+ os.chmod(args[0], options.m)
+ sys.exit()
+ if options.m:
+ os.makedirs(args[0], options.m)
+ else:
+ os.makedirs(args[0])
+ return 0
+
+ # nsinstall arg1 [...] directory
+ if len(args) < 2:
+ p.error('not enough arguments')
+
+ def copy_all_entries(entries, target):
+ for e in entries:
+ dest = os.path.join(target,
+ os.path.basename(os.path.normpath(e)))
+ handleTarget(e, dest)
+ if options.m:
+ os.chmod(dest, options.m)
+
+ # set up handler
+ if options.d:
+ # we're supposed to create directories
+ def handleTarget(srcpath, targetpath):
+ # target directory was already created, just use mkdir
+ os.mkdir(targetpath)
+ else:
+ # we're supposed to copy files
+ def handleTarget(srcpath, targetpath):
+ if os.path.isdir(srcpath):
+ if not os.path.exists(targetpath):
+ os.mkdir(targetpath)
+ entries = [os.path.join(srcpath, e) for e in os.listdir(srcpath)]
+ copy_all_entries(entries, targetpath)
+ # options.t is not relevant for directories
+ if options.m:
+ os.chmod(targetpath, options.m)
+ elif options.t:
+ if os.path.exists(targetpath):
+ os.remove(targetpath)
+ shutil.copy2(srcpath, targetpath)
+ else:
+ if os.path.exists(targetpath):
+ os.remove(targetpath)
+ shutil.copy(srcpath, targetpath)
+
+ # the last argument is the target directory
+ target = args.pop()
+ # ensure target directory
+ if not os.path.isdir(target):
+ os.makedirs(target)
+
+ copy_all_entries(args, target)
+ return 0
+
+if __name__ == '__main__':
+ sys.exit(nsinstall(sys.argv[1:]))
diff --git a/nss/nspr-4.9-build.patch b/nss/nspr-4.9-build.patch
new file mode 100644
index 000000000000..757d68ef59f8
--- /dev/null
+++ b/nss/nspr-4.9-build.patch
@@ -0,0 +1,284 @@
+--- misc/build/nss-3.13.5/mozilla/nsprpub/config/autoconf.mk.in 2011-08-29 19:02:51.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/nsprpub/config/autoconf.mk.in 2012-03-22 11:24:22.137097336 +0100
+@@ -27,6 +27,7 @@
+ OBJ_SUFFIX = $(error config/config.mk needs to be included before using OBJ_SUFFIX)
+ _OBJ_SUFFIX = @OBJ_SUFFIX@
+ LIB_SUFFIX = @LIB_SUFFIX@
++IMPORT_LIB_SUFFIX = @IMPORT_LIB_SUFFIX@
+ DLL_SUFFIX = @DLL_SUFFIX@
+ ASM_SUFFIX = @ASM_SUFFIX@
+ MOD_NAME = @NSPR_MODNAME@
+--- misc/build/nss-3.13.5/mozilla/nsprpub/config/rules.mk 2011-08-29 19:02:51.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/nsprpub/config/rules.mk 2012-03-22 11:24:22.138097311 +0100
+@@ -115,21 +115,21 @@
+ #
+
+ ifdef LIBRARY_NAME
+-ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH)))
++ifeq (,$(filter-out Linux WIN95 WINNT WINCE OS2,$(OS_ARCH)))
+
+ #
+ # Win95 and OS/2 require library names conforming to the 8.3 rule.
+ # other platforms do not.
+ #
+ ifeq (,$(filter-out WIN95 WINCE WINMO OS2,$(OS_TARGET)))
+ LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
+ SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+-IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
++IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+ SHARED_LIB_PDB = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
+ else
+ LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
+ SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+-IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
++IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+ SHARED_LIB_PDB = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
+ endif
+
+--- misc/build/nss-3.13.5/mozilla/nsprpub/configure 2012-02-14 20:06:00.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/nsprpub/configure 2012-03-22 11:24:22.139097286 +0100
+@@ -3034,6 +3034,7 @@
+
+ OBJ_SUFFIX=o
+ LIB_SUFFIX=a
++IMPORT_LIB_SUFFIX=$IMPORT_LIB_SUFFIX
+ DLL_SUFFIX=so
+ ASM_SUFFIX=s
+ MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
+@@ -4536,6 +4537,7 @@
+ CC="$CC -mwindows"
+ CXX="$CXX -mwindows"
+ DLL_SUFFIX=dll
++ IMPORT_LIB_SUFFIX=dll.a
+ MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
+ RC=$WINDRES
+ # Use temp file for windres (bug 213281)
+@@ -4552,6 +4554,7 @@
+ GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
+ OBJ_SUFFIX=obj
+ LIB_SUFFIX=lib
++ IMPORT_LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+
+ # Determine compiler version
+@@ -4661,11 +4664,11 @@
+
+ if test "$OS_TARGET" = "WINNT"; then
+ CFLAGS="$CFLAGS -GT"
+- LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+- LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
++ LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
++ LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
+ else
+- LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+- LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
++ LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
++ LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
+ fi
+ fi # GNU_CC
+
+@@ -4775,6 +4778,7 @@
+
+ OBJ_SUFFIX=obj
+ LIB_SUFFIX=lib
++ IMPORT_LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+ MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
+
+@@ -4782,8 +4786,8 @@
+ RESOLVE_LINK_SYMBOLS=1
+
+ MDCPUCFG_H=_win95.cfg
+- LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+- LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
++ LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
++ LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
+
+ DLLFLAGS='-OUT:"$@"'
+ if test -n "$MOZ_DEBUG_SYMBOLS"; then
+@@ -5584,6 +5588,7 @@
+
+ USE_PTHREADS=1
+ LIB_SUFFIX=lib
++ IMPORT_LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+ MKSHLIB=
+ DSO_LDOPTS=
+@@ -5668,6 +5673,7 @@
+ EOF
+
+ LIB_SUFFIX=lib
++ IMPORT_LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+ RC=rc.exe
+ PR_MD_ARCH_DIR=os2
+@@ -6966,6 +6972,7 @@
+ s%@CPU_ARCH@%$CPU_ARCH%g
+ s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
+ s%@LIB_SUFFIX@%$LIB_SUFFIX%g
++s%@IMPORT_LIB_SUFFIX@%$IMPORT_LIB_SUFFIX%g
+ s%@DLL_SUFFIX@%$DLL_SUFFIX%g
+ s%@ASM_SUFFIX@%$ASM_SUFFIX%g
+ s%@WRAP_LDFLAGS@%$WRAP_LDFLAGS%g
+--- misc/build/nss-3.13.5/mozilla/nsprpub/configure.in 2012-02-14 20:06:00.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/nsprpub/configure.in 2012-03-22 11:24:22.139097286 +0100
+@@ -834,6 +834,7 @@
+ dnl ========================================================
+ OBJ_SUFFIX=o
+ LIB_SUFFIX=a
++IMPORT_LIB_SUFFIX=$(IMPORT_LIB_SUFFIX)
+ DLL_SUFFIX=so
+ ASM_SUFFIX=s
+ MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
+@@ -1901,6 +1902,7 @@
+ CC="$CC -mwindows"
+ CXX="$CXX -mwindows"
+ DLL_SUFFIX=dll
++ IMPORT_LIB_SUFFIX=dll.a
+ MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
+ RC=$WINDRES
+ # Use temp file for windres (bug 213281)
+@@ -1917,6 +1919,7 @@
+ GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
+ OBJ_SUFFIX=obj
+ LIB_SUFFIX=lib
++ IMPORT_LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+
+ # Determine compiler version
+@@ -2014,11 +2017,11 @@
+
+ if test "$OS_TARGET" = "WINNT"; then
+ CFLAGS="$CFLAGS -GT"
+- LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+- LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
++ LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
++ LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
+ else
+- LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+- LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
++ LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
++ LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
+ fi
+ fi # GNU_CC
+
+@@ -2089,6 +2092,7 @@
+
+ OBJ_SUFFIX=obj
+ LIB_SUFFIX=lib
++ IMPORT_LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+ MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
+
+@@ -2096,8 +2100,8 @@
+ RESOLVE_LINK_SYMBOLS=1
+
+ MDCPUCFG_H=_win95.cfg
+- LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+- LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
++ LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
++ LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
+
+ DLLFLAGS='-OUT:"$@"'
+ if test -n "$MOZ_DEBUG_SYMBOLS"; then
+@@ -2576,6 +2580,7 @@
+ AC_DEFINE(HAVE_SOCKLEN_T)
+ USE_PTHREADS=1
+ LIB_SUFFIX=lib
++ IMPORT_LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+ MKSHLIB=
+ DSO_LDOPTS=
+@@ -2630,6 +2635,7 @@
+ AC_DEFINE(BSD_SELECT)
+ AC_DEFINE(TCPV40HDRS)
+ LIB_SUFFIX=lib
++ IMPORT_LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+ RC=rc.exe
+ PR_MD_ARCH_DIR=os2
+@@ -3291,6 +3297,7 @@
+
+ AC_SUBST(OBJ_SUFFIX)
+ AC_SUBST(LIB_SUFFIX)
++AC_SUBST(IMPORT_LIB_SUFFIX)
+ AC_SUBST(DLL_SUFFIX)
+ AC_SUBST(ASM_SUFFIX)
+ AC_SUBST(WRAP_LDFLAGS)
+--- misc/build/nss-3.13.5/mozilla/nsprpub/pr/include/md/_win95.cfg 2010-01-27 03:45:49.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/nsprpub/pr/include/md/_win95.cfg 2012-03-22 11:24:22.139097286 +0100
+@@ -106,7 +106,7 @@
+ #define PR_BYTES_PER_WORD_LOG2 2
+ #define PR_BYTES_PER_DWORD_LOG2 3
+
+-#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
++#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_) || defined (_WIN64)
+
+ #define IS_LITTLE_ENDIAN 1
+ #undef IS_BIG_ENDIAN
+--- misc/build/nss-3.13.5/mozilla/nsprpub/pr/include/md/_winnt.cfg 2010-01-27 03:45:49.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/nsprpub/pr/include/md/_winnt.cfg 2012-03-22 11:24:22.140097261 +0100
+@@ -100,7 +100,7 @@
+ #define PR_BYTES_PER_WORD_LOG2 2
+ #define PR_BYTES_PER_DWORD_LOG2 2
+
+-#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
++#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_) || defined (_WIN64)
+
+ #define IS_LITTLE_ENDIAN 1
+ #undef IS_BIG_ENDIAN
+--- misc/build/nss-3.13.5/mozilla/nsprpub/pr/src/Makefile.in 2011-09-22 17:21:06.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/nsprpub/pr/src/Makefile.in 2012-03-22 11:24:22.140097261 +0100
+@@ -9,6 +9,9 @@
+ topsrcdir = @top_srcdir@
+ srcdir = @srcdir@
+ VPATH = @srcdir@
++
++LIBRARY_NAME = nspr
++LIBRARY_VERSION = $(MOD_MAJOR_VERSION)
+
+ include $(MOD_DEPTH)/config/autoconf.mk
+
+@@ -200,9 +200,9 @@
+
+ ifeq ($(OS_ARCH),WINNT)
+ ifdef NS_USE_GCC
+-OS_LIBS = -ladvapi32 -lwsock32 -lwinmm
++OS_LIBS = -ladvapi32 -lws2_32 -lmswsock -lwinmm
+ else
+-OS_LIBS = advapi32.lib wsock32.lib winmm.lib
++OS_LIBS = advapi32.lib ws2_32.lib mswsock.lib winmm.lib
+ endif
+ endif
+
+@@ -291,8 +291,6 @@
+ include $(srcdir)/bthreads/objs.mk
+ endif
+
+-LIBRARY_NAME = nspr
+-LIBRARY_VERSION = $(MOD_MAJOR_VERSION)
+
+ RELEASE_LIBS = $(TARGETS)
+
+--- misc/build/nss-3.13.5/mozilla/nsprpub/pr/src/md/windows/ntgc.c 2010-11-30 00:26:19.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/nsprpub/pr/src/md/windows/ntgc.c 2012-03-22 11:24:22.140097261 +0100
+@@ -44,7 +44,7 @@
+
+ PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
+ {
+-#if defined(_X86_)
++#if defined(_X86_) && (!defined(_AMD64_))
+ CONTEXT context;
+ context.ContextFlags = CONTEXT_INTEGER;
+
+--- misc/build/nss-3.13.5/mozilla/nsprpub/tools/Makefile.in 2008-05-04 00:28:44.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/nsprpub/tools/Makefile.in 2012-03-22 11:24:22.140097261 +0100
+@@ -219,7 +219,7 @@
+ echo winsock.lib >>w16link
+ wlink @w16link.
+ else
+- link $(LDOPTS) $< $(LIBPR) $(LIBPLC) wsock32.lib -out:$@
++ link $(LDOPTS) $< $(LIBPR) $(LIBPLC) ws2_32.lib mswsock.lib -out:$@
+ endif
+ else
+ ifeq ($(OS_ARCH),OS2)
diff --git a/nss/nss-3.13.3-build.patch b/nss/nss-3.13.3-build.patch
new file mode 100644
index 000000000000..2e97746bf289
--- /dev/null
+++ b/nss/nss-3.13.3-build.patch
@@ -0,0 +1,259 @@
+--- misc/build/nss-3.13.5/mozilla/security/coreconf/rules.mk 2010-04-26 01:37:40.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/security/coreconf/rules.mk 2011-11-11 21:39:26.576273015 +0100
+@@ -400,7 +400,7 @@
+ PWD := $(shell pwd)
+ ifeq (,$(findstring ;,$(PATH)))
+ ifndef USE_MSYS
+-PWD := $(subst \,/,$(shell cygpath -w $(PWD)))
++#PWD := $(subst \,/,$(shell cygpath -w $(PWD)))
+ endif
+ endif
+
+--- misc/build/nss-3.13.5/mozilla/security/coreconf/WIN32.mk 2011-09-14 19:59:43.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/security/coreconf/WIN32.mk 2011-11-11 21:41:44.941584692 +0100
+@@ -124,7 +124,7 @@
+ # The -mnop-fun-dllimport flag allows us to avoid a drawback of
+ # the dllimport attribute that a pointer to a function marked as
+ # dllimport cannot be used as as a constant address.
+- OS_CFLAGS += -mwindows -mms-bitfields -mnop-fun-dllimport
++ OS_CFLAGS += -mwindows -mms-bitfields -mnop-fun-dllimport -D_WIN32_IE=0x0501 -U__MMX__ -U__SSE__ -U__SSE2__
+ _GEN_IMPORT_LIB=-Wl,--out-implib,$(IMPORT_LIBRARY)
+ DLLFLAGS += -mwindows -o $@ -shared -Wl,--export-all-symbols $(if $(IMPORT_LIBRARY),$(_GEN_IMPORT_LIB))
+ ifdef BUILD_OPT
+--- misc/build/nss-3.13.5/mozilla/security/coreconf/WINNT.mk 2009-02-14 06:51:10.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/security/coreconf/WINNT.mk 2011-11-11 21:39:26.580272977 +0100
+@@ -46,7 +46,7 @@
+ #
+ # Win NT needs -GT so that fibers can work
+ #
+-OS_CFLAGS += -GT
++#OS_CFLAGS += -GT
+
+ # WINNT uses the lib prefix, Win95 and WinCE don't
+ NSPR31_LIB_PREFIX = lib
+--- misc/build/nss-3.13.5/mozilla/security/nss/cmd/crmftest/Makefile 2005-11-14 01:17:21.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/cmd/crmftest/Makefile 2011-11-11 21:39:26.596273012 +0100
+@@ -90,7 +90,7 @@
+ LDDIST = $(DIST)/lib
+
+ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+-EXTRA_LIBS += $(LDDIST)/sectool.lib
++#EXTRA_LIBS += $(LDDIST)/sectool.lib
+ endif
+
+ include ../platrules.mk
+--- misc/build/nss-3.13.5/mozilla/security/nss/cmd/pk11mode/Makefile 2009-03-31 01:40:52.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/security/nss/cmd/pk11mode/Makefile 2011-11-11 21:39:26.596273012 +0100
+@@ -61,9 +61,9 @@
+ ifeq ($(OS_ARCH), WINNT)
+
+ EXTRA_LIBS += \
+- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
+- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
+- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
++ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(IMPORT_LIB_SUFFIX) \
++ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(IMPORT_LIB_SUFFIX) \
++ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(IMPORT_LIB_SUFFIX) \
+ $(NULL)
+
+ else
+--- misc/build/nss-3.13.5/mozilla/security/nss/cmd/shlibsign/Makefile 2009-08-07 21:06:37.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/security/nss/cmd/shlibsign/Makefile 2011-11-11 21:39:26.596273012 +0100
+@@ -59,9 +59,9 @@
+ ifeq ($(OS_ARCH), WINNT)
+
+ EXTRA_LIBS += \
+- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
+- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
+- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
++ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(IMPORT_LIB_SUFFIX) \
++ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(IMPORT_LIB_SUFFIX) \
++ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(IMPORT_LIB_SUFFIX) \
+ $(NULL)
+
+ else
+@@ -85,8 +85,8 @@
+ endif
+ CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
+
+-MD_LIB_RELEASE_FILES = $(CHECKLOC)
+-ALL_TRASH += $(CHECKLOC)
++MD_LIB_RELEASE_FILES = # $(CHECKLOC)
++#ALL_TRASH += $(CHECKLOC)
+
+
+ #######################################################################
+@@ -120,5 +120,5 @@
+ $(call core_abspath,$(NSPR_LIB_DIR)) $(call core_abspath,$<)
+ endif
+
+-libs install :: $(CHECKLOC)
++libs install :: #$(CHECKLOC)
+
+--- misc/build/nss-3.13.5/mozilla/security/nss/cmd/shlibsign/mangle/Makefile 2008-11-20 16:44:24.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/cmd/shlibsign/mangle/Makefile 2011-11-11 21:39:26.600273013 +0100
+@@ -59,9 +59,9 @@
+ ifeq ($(OS_ARCH), WINNT)
+
+ EXTRA_LIBS += \
+- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
+- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
+- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
++ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(IMPORT_LIB_SUFFIX) \
++ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(IMPORT_LIB_SUFFIX) \
++ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(IMPORT_LIB_SUFFIX) \
+ $(NULL)
+
+ else
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/ckfw/builtins/config.mk 2009-06-11 02:55:34.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/ckfw/builtins/config.mk 2011-11-11 21:39:26.600273013 +0100
+@@ -48,7 +48,7 @@
+
+ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+- RES = $(OBJDIR)/$(LIBRARY_NAME).res
++ RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
+ RESNAME = $(LIBRARY_NAME).rc
+ endif
+
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/ckfw/capi/Makefile 2009-07-29 22:15:19.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/ckfw/capi/Makefile 2011-11-11 21:39:26.608273006 +0100
+@@ -75,6 +75,9 @@
+ -lplc4 \
+ -lplds4 \
+ -lnspr4 \
++ -lcrypt32 \
++ -ladvapi32 \
++ -lrpcrt4 \
+ $(NULL)
+ endif
+
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/config.mk 2010-08-18 00:27:12.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/config.mk 2011-11-11 21:39:26.608273006 +0100
+@@ -82,7 +82,7 @@
+ # don't want the 32 in the shared library name
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+
+-RES = $(OBJDIR)/$(LIBRARY_NAME).res
++RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
+ RESNAME = freebl.rc
+
+ ifndef WINCE
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/Makefile 2011-02-06 11:13:27.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/Makefile 2011-11-11 21:39:26.608273006 +0100
+@@ -167,6 +167,17 @@
+ endif
+ endif
+ else
++# 64-bit Windows
++ifdef NS_USE_GCC
++ # win64/gcc - use the x86 code for now, skipping optimization
++ ifdef BUILD_OPT
++ OPTIMIZER += -Os
++ endif
++ ASFILES =
++ DEFINES += -DMPI_AMD64 -DMP_USE_UINT_DIGIT
++ DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
++else
++# MSVC
+ # -DMP_NO_MP_WORD
+ ifdef BUILD_OPT
+ OPTIMIZER += -Ox # maximum optimization for freebl
+@@ -178,6 +189,7 @@
+ MPI_SRCS += mpi_amd64.c
+ endif
+ endif
++endif
+
+ ifeq ($(OS_TARGET),WINCE)
+ DEFINES += -DMP_ARGCHK=0 # no assert in WinCE
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/mpi/mpi-priv.h 2010-07-20 03:26:02.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/mpi/mpi-priv.h 2011-11-11 21:39:26.632273000 +0100
+@@ -254,7 +254,7 @@
+ #define MPI_ASM_DECL
+ #endif
+
+-#ifdef MPI_AMD64
++#if defined(MPI_AMD64) && defined(MP_ASSEMBLY_MULTIPLY)
+
+ mp_digit MPI_ASM_DECL s_mpv_mul_set_vec64(mp_digit*, mp_digit *, mp_size, mp_digit);
+ mp_digit MPI_ASM_DECL s_mpv_mul_add_vec64(mp_digit*, const mp_digit*, mp_size, mp_digit);
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/nss/config.mk 2009-12-15 23:22:31.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/nss/config.mk 2011-11-11 21:39:26.632273000 +0100
+@@ -42,7 +42,7 @@
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+ IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+-RES = $(OBJDIR)/$(LIBRARY_NAME).res
++RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
+ RESNAME = $(LIBRARY_NAME).rc
+
+ ifdef NS_USE_GCC
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/smime/config.mk 2009-06-11 02:55:47.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/smime/config.mk 2011-11-11 21:39:26.632273000 +0100
+@@ -43,7 +43,7 @@
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+ IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+-RES = $(OBJDIR)/smime.res
++RES = $(OBJDIR)/smime.res.o
+ RESNAME = smime.rc
+
+ ifdef NS_USE_GCC
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/config.mk 2010-06-12 02:58:33.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/config.mk 2011-11-11 21:39:26.632273000 +0100
+@@ -49,7 +49,7 @@
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+ IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+-RES = $(OBJDIR)/$(LIBRARY_NAME).res
++RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
+ RESNAME = $(LIBRARY_NAME).rc
+
+ ifdef NS_USE_GCC
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/legacydb/config.mk 2009-06-11 02:55:49.000000000 +0200
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/legacydb/config.mk 2011-11-11 21:39:26.632273000 +0100
+@@ -51,7 +51,7 @@
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+ IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+-RES = $(OBJDIR)/$(LIBRARY_NAME).res
++RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
+ RESNAME = $(LIBRARY_NAME).rc
+
+ ifdef NS_USE_GCC
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/ssl/config.mk 2010-02-04 20:09:08.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/ssl/config.mk 2011-11-11 21:39:26.632273000 +0100
+@@ -55,7 +55,7 @@
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+ IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+-RES = $(OBJDIR)/ssl.res
++RES = $(OBJDIR)/ssl.res.o
+ RESNAME = ssl.rc
+
+ ifdef NS_USE_GCC
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/sysinit/config.mk 2010-02-16 20:38:42.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/sysinit/config.mk 2011-11-11 21:39:26.636273000 +0100
+@@ -47,8 +47,8 @@
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+ IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+-RES = $(OBJDIR)/$(LIBRARY_NAME).res
+-RESNAME = $(LIBRARY_NAME).rc
++#RES = $(OBJDIR)/$(LIBRARY_NAME).res
++#RESNAME = $(LIBRARY_NAME).rc
+
+ ifdef NS_USE_GCC
+ EXTRA_SHARED_LIBS += \
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/util/config.mk 2009-12-15 23:22:31.000000000 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/util/config.mk 2011-11-11 21:39:26.636273000 +0100
+@@ -42,7 +42,7 @@
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+ IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+-RES = $(OBJDIR)/$(LIBRARY_NAME).res
++RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
+ RESNAME = $(LIBRARY_NAME).rc
+
+ ifdef NS_USE_GCC
diff --git a/nss/nss.patch.mingw b/nss/nss.patch.mingw
index 89edd5638e20..db073e94919a 100755..100644
--- a/nss/nss.patch.mingw
+++ b/nss/nss.patch.mingw
@@ -1,167 +1,128 @@
---- misc/nss-3.12.6/mozilla/nsprpub/config/autoconf.mk.in 2009-03-04 07:04:23.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/config/autoconf.mk.in 2010-06-17 08:42:08.010625000 +0900
-@@ -22,6 +22,7 @@
- RELEASE_OBJDIR_NAME = @RELEASE_OBJDIR_NAME@
- OBJDIR_NAME = @OBJDIR_NAME@
- OBJDIR = @OBJDIR@
-+LIB_PREFIX = @LIB_PREFIX@
- OBJ_SUFFIX = @OBJ_SUFFIX@
- LIB_SUFFIX = @LIB_SUFFIX@
- DLL_SUFFIX = @DLL_SUFFIX@
---- misc/nss-3.12.6/mozilla/nsprpub/config/rules.mk 2009-12-10 06:24:37.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/config/rules.mk 2010-06-17 08:42:08.057500000 +0900
-@@ -113,9 +113,9 @@
- # other platforms do not.
- #
- ifeq (,$(filter-out WIN95 WINCE WINMO OS2,$(OS_TARGET)))
--LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
-+LIBRARY = $(OBJDIR)/$(LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
- SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
--IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
-+IMPORT_LIBRARY = $(OBJDIR)/$(LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
- SHARED_LIB_PDB = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
- else
- LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
---- misc/nss-3.12.6/mozilla/nsprpub/configure 2010-02-09 03:41:35.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/configure 2010-06-17 08:42:10.000000000 +0900
-@@ -2770,6 +2770,7 @@
- LIB_SUFFIX=a
- DLL_SUFFIX=so
- ASM_SUFFIX=s
-+LIB_PREFIX=lib
- MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
- PR_MD_ASFILES=
- PR_MD_CSRCS=
-@@ -4000,6 +4001,7 @@
- OBJ_SUFFIX=obj
- LIB_SUFFIX=lib
- DLL_SUFFIX=dll
-+ LIB_PREFIX=
-
- # Determine compiler version
- CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`
-@@ -6262,6 +6264,7 @@
- s%@LIB_SUFFIX@%$LIB_SUFFIX%g
- s%@DLL_SUFFIX@%$DLL_SUFFIX%g
- s%@ASM_SUFFIX@%$ASM_SUFFIX%g
-+s%@LIB_PREFIX@%$LIB_PREFIX%g
- s%@MKSHLIB@%$MKSHLIB%g
- s%@DSO_CFLAGS@%$DSO_CFLAGS%g
- s%@DSO_LDOPTS@%$DSO_LDOPTS%g
---- misc/nss-3.12.6/mozilla/nsprpub/pr/src/Makefile.in 2009-12-19 18:06:07.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/pr/src/Makefile.in 2010-06-17 08:42:08.151250000 +0900
-@@ -195,7 +195,7 @@
-
- ifeq ($(OS_ARCH),WINNT)
- ifdef NS_USE_GCC
--OS_LIBS = -ladvapi32 -lwsock32 -lwinmm
-+OS_LIBS += -ladvapi32 -lwsock32 -lwinmm
- else
- OS_LIBS = advapi32.lib wsock32.lib winmm.lib
+diff -up misc/build/nss-3.13.5/mozilla/nsprpub/config/Makefile.in.dt nss/wntgcci.pro/misc/build/nss-3.13.5/mozilla/nsprpub/config/Makefile.in
+--- misc/build/nss-3.13.5/mozilla/nsprpub/config/Makefile.in.dt 2012-10-29 13:30:49.244696426 +0100
++++ misc/build/nss-3.13.5/mozilla/nsprpub/config/Makefile.in 2012-10-29 13:31:26.541830215 +0100
+@@ -30,7 +30,6 @@ CSRCS = now.c
+
+ # This version hasn't been ported for us; the one in mozilla/config has
+ ifneq ($(OS_ARCH),OS2)
+-CSRCS += nsinstall.c
+
+ PLSRCS = nfspwd.pl
endif
---- misc/nss-3.12.6/mozilla/security/coreconf/WIN32.mk 2009-07-29 09:15:46.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/WIN32.mk 2010-06-17 08:42:08.198125000 +0900
-@@ -43,8 +43,8 @@
- DEFAULT_COMPILER = cl
-
- ifdef NS_USE_GCC
-- CC = gcc
-- CCC = g++
-+# CC = gcc
-+ CCC = $(CXX)
- LINK = ld
- AR = ar
- AR += cr $@
---- misc/nss-3.12.6/mozilla/security/coreconf/WIN95.mk 2009-02-14 14:51:10.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/WIN95.mk 2010-06-17 08:42:08.245000000 +0900
-@@ -44,4 +44,8 @@
- DEFINES += -DWIN95
-
- # WINNT uses the lib prefix, Win95 and WinCE don't
--NSPR31_LIB_PREFIX = $(NULL)
-+ifdef NS_USE_GCC
-+ NSPR31_LIB_PREFIX = lib
-+else
-+ NSPR31_LIB_PREFIX = $(NULL)
-+endif
-\ No newline at end of file
---- misc/nss-3.12.6/mozilla/security/coreconf/rules.mk 2009-12-08 10:33:36.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/rules.mk 2010-06-17 08:42:08.291875000 +0900
-@@ -281,8 +281,12 @@
- fi
- endif # MSVC with manifest tool
+@@ -84,7 +83,6 @@ else
+ ifeq (,$(filter-out SYMBIAN WINCE,$(OS_ARCH)))
+ TARGETS = $(PROGS)
else
-+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
-+ $(MKPROG) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) -Wl,--start-group $(EXTRA_LIBS) -Wl,--end-group $(EXTRA_SHARED_LIBS) $(OS_LIBS)
-+else
- $(MKPROG) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
+-PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
+ TARGETS = $(PROGS) $(PLSRCS:.pl=)
endif
-+endif
-
- get_objs:
- @echo $(OBJS)
---- misc/nss-3.12.6/mozilla/security/nss/Makefile 2009-12-09 01:47:03.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/nss/Makefile 2010-06-17 08:42:08.338750000 +0900
-@@ -108,7 +108,7 @@
- NSPR_CONFIGURE_OPTS += --enable-debug-rtl
endif
- ifdef NS_USE_GCC
--NSPR_COMPILERS = CC=gcc CXX=g++
-+NSPR_COMPILERS = CC="$(CC)" CXX="$(CXX)"
+diff -up ./nss-3.13.5/mozilla/security/nss/Makefile.dt ./nss-3.13.5/mozilla/security/nss/Makefile
+--- misc/build/nss-3.13.5/mozilla/security/nss/Makefile.dt 2012-10-30 10:13:07.165713712 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/Makefile 2012-10-30 10:13:09.680656998 +0100
+@@ -58,7 +58,7 @@ include $(CORE_DEPTH)/coreconf/config.mk
+ # (4) Include "local" platform-dependent assignments (OPTIONAL). #
+ #######################################################################
+
+-ifeq ($(OS_TARGET),WINCE)
++ifeq ($(OS_TARGET),WINNT)
+ DIRS = lib # omit cmd since wince has no command line shell
endif
- #
---- misc/nss-3.12.6/mozilla/security/nss/cmd/crmftest/Makefile 2005-11-14 09:17:21.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/nss/cmd/crmftest/Makefile 2010-06-17 08:42:08.370000000 +0900
-@@ -90,7 +90,7 @@
- LDDIST = $(DIST)/lib
+diff -up misc/build/nss-3.13.5/mozilla/security/nss/cmd/platlibs.mk.dt misc/build/nss-3.13.5/mozilla/security/nss/cmd/platlibs.mk
+diff -up misc/build/nss-3.13.5/mozilla/security/nss/lib/nss/config.mk.dt misc/build/nss-3.13.5/mozilla/security/nss/lib/nss/config.mk
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/nss/config.mk.dt 2012-10-30 12:31:06.675726730 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/nss/config.mk 2012-10-30 12:31:08.860676053 +0100
+@@ -40,7 +40,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
- ifeq (,$(filter-out WIN%,$(OS_TARGET)))
--EXTRA_LIBS += $(LDDIST)/sectool.lib
-+EXTRA_LIBS += $(LDDIST)/$(LIB_PREFIX)sectool.$(LIB_SUFFIX)
- endif
+ # don't want the 32 in the shared library name
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+-IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
++IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
- include ../platrules.mk
---- misc/nss-3.12.6/mozilla/security/nss/cmd/shlibsign/Makefile 2009-08-08 04:06:37.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/nss/cmd/shlibsign/Makefile 2010-06-17 08:42:10.000000000 +0900
-@@ -115,10 +115,16 @@
- $(call core_abspath,$(OBJDIR)) $(OS_TARGET) \
- $(call core_abspath,$(NSPR_LIB_DIR)) $(call core_abspath,$<)
- else
-+ifeq ($(OS_TARGET), WIN95)
-+ sh ./sign.sh $(shell cygpath -m -a $(DIST)) \
-+ $(shell cygpath -m -a $(OBJDIR)) $(OS_TARGET) \
-+ $(shell cygpath -m -a $(NSPR_LIB_DIR)) $(shell cygpath -m -a $<)
-+else
- cd $(OBJDIR) ; sh $(SRCDIR)/sign.sh $(call core_abspath,$(DIST)) \
- $(call core_abspath,$(OBJDIR)) $(OS_TARGET) \
- $(call core_abspath,$(NSPR_LIB_DIR)) $(call core_abspath,$<)
- endif
-+endif
-
- libs install :: $(CHECKLOC)
-
---- misc/nss-3.12.6/mozilla/security/nss/lib/freebl/config.mk 2009-04-12 06:18:42.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/nss/lib/freebl/config.mk 2010-06-17 08:42:08.557500000 +0900
-@@ -84,10 +84,6 @@
- RES = $(OBJDIR)/$(LIBRARY_NAME).res
- RESNAME = freebl.rc
-
--ifndef WINCE
--OS_LIBS += shell32.lib
--endif
--
- ifdef NS_USE_GCC
- EXTRA_SHARED_LIBS += \
- -L$(DIST)/lib \
-@@ -97,6 +93,10 @@
- -lnspr4 \
- $(NULL)
- else # ! NS_USE_GCC
-+ifndef WINCE
-+OS_LIBS += shell32.lib
-+endif
-+
- EXTRA_SHARED_LIBS += \
- $(DIST)/lib/nssutil3.lib \
- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
+ RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
+ RESNAME = $(LIBRARY_NAME).rc
+diff -up misc/build/nss-3.13.5/mozilla/security/nss/lib/smime/config.mk.dt misc/build/nss-3.13.5/mozilla/security/nss/lib/smime/config.mk
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/smime/config.mk.dt 2012-10-30 12:30:52.020062600 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/smime/config.mk 2012-10-30 12:30:54.504004586 +0100
+@@ -41,7 +41,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+
+ # don't want the 32 in the shared library name
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+-IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
++IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+ RES = $(OBJDIR)/smime.res.o
+ RESNAME = smime.rc
+diff -up misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/config.mk.dt misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/config.mk
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/config.mk.dt 2012-10-30 12:31:02.707816790 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/config.mk 2012-10-30 12:31:04.388778631 +0100
+@@ -47,7 +47,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+
+ # don't want the 32 in the shared library name
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+-IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
++IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+ RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
+ RESNAME = $(LIBRARY_NAME).rc
+diff -up misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/legacydb/config.mk.dt misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/legacydb/config.mk
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/legacydb/config.mk.dt 2012-10-30 12:30:56.531958414 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/legacydb/config.mk 2012-10-30 12:31:00.575865594 +0100
+@@ -48,7 +48,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+
+ # don't want the 32 in the shared library name
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+-IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
++IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+ RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
+ RESNAME = $(LIBRARY_NAME).rc
+diff -up misc/build/nss-3.13.5/mozilla/security/nss/lib/sqlite/config.mk.dt misc/build/nss-3.13.5/mozilla/security/nss/lib/sqlite/config.mk
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/sqlite/config.mk.dt 2012-10-30 12:31:10.499638736 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/sqlite/config.mk 2012-10-30 12:31:12.624590177 +0100
+@@ -41,7 +41,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+
+ # don't want the 32 in the shared library name
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+-IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
++IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+ #RES = $(OBJDIR)/$(LIBRARY_NAME).res
+ #RESNAME = $(LIBRARY_NAME).rc
+diff -up misc/build/nss-3.13.5/mozilla/security/nss/lib/ssl/config.mk.dt misc/build/nss-3.13.5/mozilla/security/nss/lib/ssl/config.mk
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/ssl/config.mk.dt 2012-10-30 12:31:14.882539495 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/ssl/config.mk 2012-10-30 12:31:16.379504032 +0100
+@@ -53,7 +53,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+
+ # don't want the 32 in the shared library name
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+-IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
++IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+ RES = $(OBJDIR)/ssl.res.o
+ RESNAME = ssl.rc
+diff -up misc/build/nss-3.13.5/mozilla/security/nss/lib/sysinit/config.mk.dt misc/build/nss-3.13.5/mozilla/security/nss/lib/sysinit/config.mk
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/sysinit/config.mk.dt 2012-10-30 12:31:18.195462428 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/sysinit/config.mk 2012-10-30 12:31:20.277414942 +0100
+@@ -45,7 +45,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+
+ # don't want the 32 in the shared library name
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+-IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
++IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+ #RES = $(OBJDIR)/$(LIBRARY_NAME).res
+ #RESNAME = $(LIBRARY_NAME).rc
+diff -up misc/build/nss-3.13.5/mozilla/security/nss/lib/util/config.mk.dt misc/build/nss-3.13.5/mozilla/security/nss/lib/util/config.mk
+--- misc/build/nss-3.13.5/mozilla/security/nss/lib/util/config.mk.dt 2012-10-30 12:31:22.179371231 +0100
++++ misc/build/nss-3.13.5/mozilla/security/nss/lib/util/config.mk 2012-10-30 12:31:24.074328169 +0100
+@@ -40,7 +40,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+
+ # don't want the 32 in the shared library name
+ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+-IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
++IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
+
+ RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
+ RESNAME = $(LIBRARY_NAME).rc