diff options
Diffstat (limited to 'nss')
-rw-r--r-- | nss/makefile.mk | 184 | ||||
-rw-r--r-- | nss/nss.aix.patch | 143 | ||||
-rw-r--r-- | nss/nss.patch | 191 | ||||
-rwxr-xr-x | nss/nss.patch.mingw | 167 | ||||
-rw-r--r-- | nss/nss_macosx.patch | 12 | ||||
-rw-r--r-- | nss/prj/build.lst | 3 | ||||
-rwxr-xr-x | nss/prj/d.lst | 31 | ||||
-rwxr-xr-x | nss/readme.txt | 75 |
8 files changed, 806 insertions, 0 deletions
diff --git a/nss/makefile.mk b/nss/makefile.mk new file mode 100644 index 000000000000..67e01c5d2d44 --- /dev/null +++ b/nss/makefile.mk @@ -0,0 +1,184 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=. + +PRJNAME=nss +TARGET=nss + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Files -------------------------------------------------------- + +.IF "$(ENABLE_NSS_MODULE)"!="YES" +all: + @echo "NSS will not be built. ENABLE_NSS_MODULE is '$(ENABLE_NSS_MODULE)'" +.ENDIF + +TARFILE_NAME=nss-3.12.8-with-nspr-4.8.6 +TARFILE_MD5=71474203939fafbe271e1263e61d083e +TARFILE_ROOTDIR=nss-3.12.8 +PATCH_FILES=nss.patch nss.aix.patch + +.IF "$(OS)"=="MACOSX" +PATCH_FILES+=nss_macosx.patch +.ENDIF # "$(OS)"=="MACOSX" + +.IF "$(debug)" != "" +.ELSE +BUILD_OPT=1 +.EXPORT: BUILD_OPT +.ENDIF + +.IF "$(GUI)"=="UNX" +.IF "$(OS)$(COM)"=="LINUXGCC" +.IF "$(BUILD64)"=="1" +# force 64-bit buildmode +USE_64:=1 +.EXPORT : USE_64 +.ENDIF # "$(CPU)"=="X" +.ENDIF # "$(OS)$(COM)"=="LINUXGCC" + +.IF "$(OS)$(COM)"=="FREEBSDGCC" +.IF "$(CPU)"=="X" +# force 64-bit buildmode +USE_64:=1 +.EXPORT : USE_64 +.ENDIF # "$(CPU)"=="X" +.ENDIF # "$(OS)$(COM)"=="LINUXGCC" + +.IF "$(OS)"=="MACOSX" +.IF "$(EXTRA_CFLAGS)"!="" +CPP:=gcc -E $(EXTRA_CFLAGS) +CXX:=g++ $(EXTRA_CFLAGS) +CC:=gcc $(EXTRA_CFLAGS) +MACOS_SDK_DIR*=$(MACDEVSDK) +.EXPORT : CPP MACOS_SDK_DIR +.ENDIF # "$(EXTRA_CFLAGS)"!="" +.ENDIF # "$(OS)"=="MACOSX" + +OUT2LIB=mozilla$/dist$/out$/lib$/*$(DLLPOST) + +BUILD_DIR=mozilla$/security$/nss +BUILD_ACTION= $(GNUMAKE) nss_build_all +#See #i105566# && moz#513024# +.IF "$(OS)"=="LINUX" +BUILD_ACTION+=FREEBL_NO_DEPEND=1 +.ENDIF + +.ENDIF # "$(GUI)"=="UNX" + + +.IF "$(GUI)"=="WNT" + +.IF "$(COM)"=="GCC" + +PATCH_FILES+=nss.patch.mingw + +moz_build:=$(shell cygpath -p $(MOZILLABUILD)) +PATH!:=$(moz_build)/bin:$(PATH) + +nss_CC=$(CC) +nss_CXX=$(CXX) +.IF "$(MINGW_SHARED_GCCLIB)"=="YES" +nss_CC+=-shared-libgcc +nss_CXX+=-shared-libgcc +.ENDIF + +nss_LIBS= +.IF "$(MINGW_SHARED_GXXLIB)"=="YES" +nss_LIBS+=-lstdc++_s +.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 + +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 + +.ELSE # "$(COM)"=="GCC" +MOZ_MSVCVERSION= 9 +.EXPORT : MOZ_MSVCVERSION +moz_build:=$(shell cygpath -p $(MOZILLABUILD)) +PATH!:=$(moz_build)/msys/bin:$(moz_build)/moztools/bin:$(PATH) +.EXPORT : PATH + +#Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll +#become libnspr4.dll, libplc4.dll, libplds4.dll +#WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000). +#OS_TARGET= WINNT +OS_TARGET=WIN95 +.EXPORT : OS_TARGET + +# make use of stlport headerfiles +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) +BUILD_ACTION= $(subst,/,$/ $(MOZILLABUILD)/msys/bin/bash) -i \ + -c "cd $(NSS_BUILD_DIR) && make nss_build_all" + +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 + +.ENDIF # "$(COM)"=="GCC" + +OUT2BIN=mozilla$/dist$/out$/lib$/*$(DLLPOST) +.ENDIF # "$(GUI)"=="WNT" + + +OUTDIR2INC=mozilla$/dist$/public$/nss mozilla$/dist$/out$/include + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk + + diff --git a/nss/nss.aix.patch b/nss/nss.aix.patch new file mode 100644 index 000000000000..430b699150bd --- /dev/null +++ b/nss/nss.aix.patch @@ -0,0 +1,143 @@ +--- misc/nss-3.12.8/mozilla/nsprpub/configure 2010-08-18 07:23:01.000000000 -0500 ++++ misc/build/nss-3.12.8/mozilla/nsprpub/configure 2010-08-18 07:33:11.000000000 -0500 +@@ -2973,7 +2973,8 @@ + #define SYSV 1 + EOF + +- DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib' ++ MKSHLIB='$(CCC) -shared $(DSO_LDOPTS) -o $@' ++ DSO_LDOPTS='-Wl,-brtl -Wl,-bnortllib -Wl,-blibpath:/usr/lib:/lib' + ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6 + echo "configure:2980: checking for sys/atomic_op.h" >&5 +@@ -3102,7 +3103,6 @@ + AIX_LINK_OPTS='-brtl -bnso -berok' + ;; + esac +- CFLAGS="$CFLAGS -qro -qroconst" + AIX_WRAP='$(DIST)/lib/aixwrap.o' + AIX_TMP='./_aix_tmp.o' + if test -n "$USE_64"; then +--- misc/nss-3.12.8/mozilla/nsprpub/configure.in 2010-08-18 07:23:01.000000000 -0500 ++++ misc/build/nss-3.12.8/mozilla/nsprpub/configure.in 2010-08-18 07:32:36.000000000 -0500 +@@ -831,7 +831,8 @@ + AC_DEFINE(XP_UNIX) + AC_DEFINE(AIX) + AC_DEFINE(SYSV) +- DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib' ++ DSO_LDOPTS='-Wl,-brtl -Wl,-bnortllib -Wl,-blibpath:/usr/lib:/lib' ++ MKSHLIB='$(CCC) -shared $(DSO_LDOPTS) -o $@' + AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H)) + case "${target_os}" in + aix3.2*) +@@ -871,10 +872,9 @@ + AC_DEFINE(HAVE_SOCKLEN_T) + AC_DEFINE(HAVE_FCNTL_FILE_LOCKING) + USE_IPV6=1 +- AIX_LINK_OPTS='-brtl -bnso -berok' ++ AIX_LINK_OPTS='-Wl,-brtl -Wl,-bnso -Wl,-berok' + ;; + esac +- CFLAGS="$CFLAGS -qro -qroconst" + AIX_WRAP='$(DIST)/lib/aixwrap.o' + AIX_TMP='./_aix_tmp.o' + if test -n "$USE_64"; then +--- misc/nss-3.12.8/mozilla/nsprpub/pr/src/Makefile.in 2010-08-18 07:23:04.000000000 -0500 ++++ misc/build/nss-3.12.8/mozilla/nsprpub/pr/src/Makefile.in 2010-08-18 07:24:49.000000000 -0500 +@@ -110,7 +110,6 @@ + endif + + ifeq ($(OS_ARCH),AIX) +-DSO_LDOPTS += -binitfini::_PR_Fini + OS_LIBS = -lodm -lcfg + ifeq ($(CLASSIC_NSPR),1) + ifeq ($(OS_RELEASE),4.1) +--- misc/nss-3.12.8/mozilla/security/coreconf/AIX.mk 2010-08-18 07:23:06.000000000 -0500 ++++ misc/build/nss-3.12.8/mozilla/security/coreconf/AIX.mk 2010-08-18 07:26:26.000000000 -0500 +@@ -62,35 +62,30 @@ + + DEFAULT_COMPILER = xlc_r + +-CC = xlc_r +-CCC = xlC_r ++CCC = $(CXX) + + CPU_ARCH = rs6000 + + RANLIB = ranlib + + OS_CFLAGS = -DAIX -DSYSV +-OS_LIBS += -blibpath:/usr/lib:/lib -lc -lm ++OS_LIBS += -Wl,-blibpath:/usr/lib:/lib -lc -lm + +-DSO_LDOPTS = -brtl -bnortllib -bM:SRE -bnoentry +-MKSHLIB = $(LD) $(DSO_LDOPTS) -blibpath:/usr/lib:/lib -lc -lm ++DSO_LDOPTS = -Wl,-brtl -Wl,-bnortllib ++MKSHLIB = $(CC) --shared $(DSO_LDOPTS) -Wl,-blibpath:/usr/lib:/lib -lc -lm + + AIX_WRAP = $(DIST)/lib/aixwrap.o + AIX_TMP = $(OBJDIR)/_aix_tmp.o + + ifdef MAPFILE +-DSO_LDOPTS += -bexport:$(MAPFILE) ++DSO_LDOPTS += -Wl,-bexport:$(MAPFILE) + else +-DSO_LDOPTS += -bexpall ++DSO_LDOPTS += -Wl,-bexpall + endif + + PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \ + sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' > $@ + +-ifdef BUILD_OPT +- OPTIMIZER += -qmaxmem=-1 +-endif +- + ifeq ($(USE_64), 1) + OS_CFLAGS += -DAIX_64BIT + OBJECT_MODE=64 +--- misc/nss-3.12.8/mozilla/security/nss/cmd/platlibs.mk 2010-08-18 07:23:18.000000000 -0500 ++++ misc/build/nss-3.12.8/mozilla/security/nss/cmd/platlibs.mk 2010-08-18 07:26:48.000000000 -0500 +@@ -173,7 +173,7 @@ + $(NULL) + + ifeq ($(OS_ARCH), AIX) +-EXTRA_SHARED_LIBS += -brtl ++EXTRA_SHARED_LIBS += -Wl,-brtl + endif + + # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) +@@ -223,7 +223,7 @@ + $(NULL) + + ifeq ($(OS_ARCH), AIX) +-EXTRA_SHARED_LIBS += -brtl ++EXTRA_SHARED_LIBS += -Wl,-brtl + endif + + # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) +--- misc/nss-3.12.8/mozilla/security/nss/cmd/shlibsign/mangle/Makefile 2010-08-18 07:23:20.000000000 -0500 ++++ misc/build/nss-3.12.8/mozilla/security/nss/cmd/shlibsign/mangle/Makefile 2010-08-18 07:42:44.000000000 -0500 +@@ -75,7 +75,9 @@ + + endif + +- ++ifeq ($(OS), AIX) ++EXTRA_SHARED_LIBS += -lpthreads ++endif + + ####################################################################### + # (5) Execute "global" rules. (OPTIONAL) # +--- misc/nss-3.12.8/mozilla/security/nss/cmd/shlibsign/Makefile 2010-08-18 08:00:17.000000000 -0500 ++++ misc/build/nss-3.12.8/mozilla/security/nss/cmd/shlibsign/Makefile 2010-08-18 07:55:55.000000000 -0500 +@@ -75,6 +75,9 @@ + + endif + ++ifeq ($(OS), AIX) ++EXTRA_SHARED_LIBS += -lpthreads ++endif + + # sign any and all shared libraries that contain the word freebl + diff --git a/nss/nss.patch b/nss/nss.patch new file mode 100644 index 000000000000..6930e6753ac9 --- /dev/null +++ b/nss/nss.patch @@ -0,0 +1,191 @@ +--- misc/nss-3.12.8/mozilla/nsprpub/config/rules.mk 2009-12-09 22:24:37.000000000 +0100 ++++ misc/build/nss-3.12.8/mozilla/nsprpub/config/rules.mk 2010-06-11 16:35:54.946870871 +0200 +@@ -345,7 +345,12 @@ + ifdef NS_USE_GCC + $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $< + else +- $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $< ++ #We remove stl from the paths to avoid that rc.exe finds the stlport of ++ #OOo. stlport includes the system stl which will fail. By removing it, ++ #rc will use the stl from the system if the path is in the INCLUDE ++ #variable. ++ INCLUDE="$(subst /stl,,$(INCLUDE))" $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $< ++ + endif # GCC + @echo $(RES) finished + endif +--- misc/nss-3.12.8/mozilla/nsprpub/configure 2010-02-08 19:41:35.000000000 +0100 ++++ misc/build/nss-3.12.8/mozilla/nsprpub/configure 2010-06-11 16:35:54.960188991 +0200 +@@ -3900,7 +3900,7 @@ + PR_MD_CSRCS=linux.c + MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' + DSO_CFLAGS=-fPIC +- DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' ++ DSO_LDOPTS='-shared -Wl,-rpath,\$$ORIGIN -Wl,-soname -Wl,$(notdir $@)' + _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.12.8/mozilla/security/coreconf/Darwin.mk 2010-02-04 19:59:10.000000000 +0100 ++++ misc/build/nss-3.12.8/mozilla/security/coreconf/Darwin.mk 2010-06-11 16:35:54.966185975 +0200 +@@ -39,8 +39,12 @@ + + DEFAULT_COMPILER = cc + +-CC = cc +-CCC = c++ ++# CC is taken from environment automatically. ++#CC = cc ++# Use CCC from environment. ++#CCC = c++ ++CCC = $(CXX) ++ + RANLIB = ranlib + + ifndef CPU_ARCH +--- misc/nss-3.12.8/mozilla/security/coreconf/Linux.mk 2010-01-15 23:19:00.000000000 +0100 ++++ misc/build/nss-3.12.8/mozilla/security/coreconf/Linux.mk 2010-06-11 16:35:54.981151732 +0200 +@@ -46,8 +46,11 @@ + IMPL_STRATEGY = _PTH + endif + +-CC = gcc +-CCC = g++ ++# CC is taken from environment automatically. ++#CC = gcc ++# Use CCC from environment. ++#CCC = g++ ++CCC = $(CXX) + RANLIB = ranlib + + DEFAULT_COMPILER = gcc +@@ -147,7 +150,7 @@ + # 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) + + # INCLUDES += -I/usr/include -Y/usr/include/linux +@@ -158,8 +161,13 @@ + # + CPU_TAG = _$(CPU_ARCH) + ++ifeq ($(SYSTEM_ZLIB),YES) ++# Currently (3.12.4) only the tools modutil and signtool are linked with libz ++# If USE_SYSTEM_ZLIB is not set then the tools link statically libzlib.a which ++# is also build in nss. + USE_SYSTEM_ZLIB = 1 + ZLIB_LIBS = -lz ++endif + + # The -rpath '$$ORIGIN' linker option instructs this library to search for its + # dependencies in the same directory where it resides. +--- misc/nss-3.12.8/mozilla/security/coreconf/SunOS5.mk 2009-06-11 02:55:32.000000000 +0200 ++++ misc/build/nss-3.12.8/mozilla/security/coreconf/SunOS5.mk 2010-06-11 16:35:54.985571182 +0200 +@@ -89,8 +89,12 @@ + # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer + endif + else +- CC = cc +- CCC = CC ++# CC is taken from environment automatically. ++# CC = cc ++# Use CXX from environment. ++# CCC = CC ++ CCC = $(CXX) ++ + ASFLAGS += -Wa,-P + OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG) + ifndef BUILD_OPT +--- misc/nss-3.12.8/mozilla/security/coreconf/arch.mk 2009-06-05 04:14:49.000000000 +0200 ++++ misc/build/nss-3.12.8/mozilla/security/coreconf/arch.mk 2010-06-11 16:35:54.990913282 +0200 +@@ -324,7 +324,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 ++# 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". ++#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ ++OBJDIR_NAME = out + + ifeq (,$(filter-out WIN%,$(OS_TARGET))) + ifndef BUILD_OPT +--- misc/nss-3.12.8/mozilla/security/coreconf/rules.mk 2009-12-08 02:33:36.000000000 +0100 ++++ misc/build/nss-3.12.8/mozilla/security/coreconf/rules.mk 2010-06-11 16:35:54.996448704 +0200 +@@ -355,7 +355,12 @@ + ifdef NS_USE_GCC + $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $< + else +- $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $< ++ #We remove stl from the paths to avoid that rc.exe finds the stlport of ++ #OOo. stlport includes the system stl which will fail. By removing it, ++ #rc will use the stl from the system if the path is in the INCLUDE ++ #variable. ++ INCLUDE="$(subst /stl,,$(INCLUDE))" $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $< ++ + endif + @echo $(RES) finished + endif +--- misc/nss-3.12.8/mozilla/security/nss/cmd/platlibs.mk 2010-02-04 19:59:10.000000000 +0100 ++++ misc/build/nss-3.12.8/mozilla/security/nss/cmd/platlibs.mk 2010-06-11 16:35:55.004869805 +0200 +@@ -41,27 +41,28 @@ + ifeq ($(OS_ARCH), SunOS) + ifeq ($(BUILD_SUN_PKG), 1) + ifeq ($(USE_64), 1) +-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64' ++#In OOo 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 + else +-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib' ++EXTRA_SHARED_LIBS += -R '$$ORIGIN' + endif + endif + + ifeq ($(OS_ARCH), Linux) + ifeq ($(BUILD_SUN_PKG), 1) + 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 + else + ifeq ($(USE_64), 1) +-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib' ++EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN' + else +-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib' ++EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN' + endif + endif + endif +--- misc/nss-3.12.8/mozilla/security/nss/cmd/shlibsign/Makefile 2009-08-07 21:06:37.000000000 +0200 ++++ misc/build/nss-3.12.8/mozilla/security/nss/cmd/shlibsign/Makefile 2010-06-11 16:35:55.009851148 +0200 +@@ -78,10 +78,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 --git a/nss/nss.patch.mingw b/nss/nss.patch.mingw new file mode 100755 index 000000000000..89edd5638e20 --- /dev/null +++ b/nss/nss.patch.mingw @@ -0,0 +1,167 @@ +--- 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 + 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 + 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) + 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)" + 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 + + ifeq (,$(filter-out WIN%,$(OS_TARGET))) +-EXTRA_LIBS += $(LDDIST)/sectool.lib ++EXTRA_LIBS += $(LDDIST)/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) + endif + + 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 \ diff --git a/nss/nss_macosx.patch b/nss/nss_macosx.patch new file mode 100644 index 000000000000..a6ddcd14ac57 --- /dev/null +++ b/nss/nss_macosx.patch @@ -0,0 +1,12 @@ +--- misc/nss-3.12.8/mozilla/security/nss/Makefile 2008-12-03 00:24:39.000000000 +0100 ++++ misc/build/nss-3.12.8/mozilla/security/nss/Makefile 2009-11-27 13:36:22.662753328 +0100 +@@ -104,6 +104,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 --git a/nss/prj/build.lst b/nss/prj/build.lst new file mode 100644 index 000000000000..1465b16be200 --- /dev/null +++ b/nss/prj/build.lst @@ -0,0 +1,3 @@ +ns nss : solenv stlport NULL +ns nss nmake - usr1 ns_mkout NULL +ns nss nmake - all ns_nss NULL diff --git a/nss/prj/d.lst b/nss/prj/d.lst new file mode 100755 index 000000000000..f1090ca8d91e --- /dev/null +++ b/nss/prj/d.lst @@ -0,0 +1,31 @@ +mkdir: %_DEST%\inc%_EXT%\mozilla\nspr +mkdir: %_DEST%\inc%_EXT%\mozilla\nspr\obsolete +mkdir: %_DEST%\inc%_EXT%\mozilla\nss +mkdir: %_DEST%\lib%_EXT%\sqlite + +..\%__SRC%\inc\include\* %_DEST%\inc%_EXT%\mozilla\nspr +..\%__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\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.* +..\%__SRC%\lib\libfreebl_64int_3.* %_DEST%\lib%_EXT%\libfreebl_64int_3.* +..\%__SRC%\lib\libfreebl_64fpu_3.* %_DEST%\lib%_EXT%\libfreebl_64fpu_3.* +..\%__SRC%\lib\libnspr4.* %_DEST%\lib%_EXT%\libnspr4.* +..\%__SRC%\lib\libnss3.* %_DEST%\lib%_EXT%\libnss3.* +..\%__SRC%\lib\libnssckbi.* %_DEST%\lib%_EXT%\libnssckbi.* +..\%__SRC%\lib\libnssdbm3.* %_DEST%\lib%_EXT%\libnssdbm3.* +..\%__SRC%\lib\libnssutil3.* %_DEST%\lib%_EXT%\libnssutil3.* +..\%__SRC%\lib\libplc4.* %_DEST%\lib%_EXT%\libplc4.* +..\%__SRC%\lib\libplds4.* %_DEST%\lib%_EXT%\libplds4.* +..\%__SRC%\lib\libsmime3.* %_DEST%\lib%_EXT%\libsmime3.* +..\%__SRC%\lib\libsoftokn3.* %_DEST%\lib%_EXT%\libsoftokn3.* +..\%__SRC%\lib\libssl3.* %_DEST%\lib%_EXT%\libssl3.* + +..\%__SRC%\lib\libsqlite3.* %_DEST%\lib%_EXT%\sqlite\libsqlite3.* +..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT% + +..\%__SRC%\bin\* %_DEST%\bin%_EXT% + diff --git a/nss/readme.txt b/nss/readme.txt new file mode 100755 index 000000000000..df65908204c4 --- /dev/null +++ b/nss/readme.txt @@ -0,0 +1,75 @@ +Relation between nss, moz, moz_prebuilt +--------------------------------------- +nss containes the security libraries which are also part of moz. However nss is +meant to be more current, that is it to be updated more often. This should be +easier than doing this with moz. + +If nss is build depends on an environment variable (ENABLE_NSS_MODULE=YES) which +is per default set to YES. In this case nss is build before moz. The nss +libraries/lib files/headers built in moz are then not delivered. Otherwise they +would overwrite those from nss. That is, the nss libraries build in moz are +removed from mozruntime.zip (build in moz/solver/bin), they are removed from the +lib directory (for example moz/unxlngi6.pro/lib), and the nss and nspr headers +are also removed (inc/nss and inc/nspr). The nss libraries from the nss module +are then added to mozruntime.zip. + +This also applies for moz_prebuilt. Therefore moz and moz_prebuilt must be build +again after changes have been made to the libraries in the nss module. + +Also when moz was updated to use a newer version of mozilla, then one must make +sure that new files which also belong to nss are not delivered and are removed +from mozruntime.zip. + +Fips 140 and signed libraries +------------------------------- +Fips 140 mode is not supported. That is, the *.chk files containing the +checksums for the cryptographic module are not delivered into solver and will +not be part of the OOo installation sets. + +Signing has been turned off because +- we change the rpath (install names) after signing which breaks the signatures +(Mac) +- sqlite conflicts with the system sqlite when signing which breaks the build + + +libfreebl3 +---------- +Porting to other platforms may require to deliver other variants of +libfreebl*. The library name varies according to the platform. Changes need to +be made to +ooo/moz/extractfiles.mk +ooo/moz/zipped/makefile.mk +sun/moz_prebuilt/zipped/makefile.mk + +See also +http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html + + +Windows builds of nss +--------------------- +To build mozilla on windows you'll need the mozilla build tools + +Build requirements containing the link to the build tools: +https://developer.mozilla.org/en/Windows_Build_Prerequisites#ss2.2 + +The direct link: + +http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.3.exe + +libsqlite3 +---------- +The problem described here was found on Mac with OS 10.6 +NSS cannot use the system sqlite on Mac because the base line is still MacOS +10.4. That system sqlite is incompatible with the softokn3 in nss which requires +a later version of sqlite. +When we used a more current Mac SDK then we could set +NSS_USE_SYSTEM_SQLITE=1 +to build using the system sqlite. + +We cannot deliver sqlite in the lib directory of the solver. This directory is +used by tools of the build environment. Using the sqlite from NSS breaks the +tools if they use system libraries which are linked with the system +sqlite. Therefore we deliver it into lib/sqlite on unix systems. + +See also issue +http://qa.openoffice.org/issues/show_bug.cgi?id=106132 |