xref: /aoo41x/main/nss/nss.patch (revision c38ced1b)
1--- misc/nss-3.14.4/mozilla/nsprpub/config/rules.mk	2009-12-09 22:24:37.000000000 +0100
2+++ misc/build/nss-3.14.4/mozilla/nsprpub/config/rules.mk	2010-06-11 16:35:54.946870871 +0200
3@@ -377,7 +377,12 @@
4 ifdef NS_USE_GCC
5 	$(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
6 else
7-	$(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $<
8+        #We remove stl from the paths to avoid that rc.exe finds the stlport of
9+        #OOo. stlport includes the system stl which will fail. By removing it,
10+        #rc will use the stl from the system if the path is in the INCLUDE
11+        #variable.
12+	INCLUDE="$(subst /stl,,$(INCLUDE))" $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $<
13+
14 endif # GCC
15 	@echo $(RES) finished
16 endif
17--- misc/nss-3.14.4/mozilla/nsprpub/configure	2010-02-08 19:41:35.000000000 +0100
18+++ misc/build/nss-3.14.4/mozilla/nsprpub/configure	2010-06-11 16:35:54.960188991 +0200
19@@ -4443,7 +4443,7 @@
20     PR_MD_CSRCS=linux.c
21     MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
22     DSO_CFLAGS=-fPIC
23-    DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
24+    DSO_LDOPTS='-shared -Wl,-rpath,\$$ORIGIN -Wl,-soname -Wl,$(notdir $@)'
25     _OPTIMIZE_FLAGS=-O2
26     _DEBUG_FLAGS="-g -fno-inline"  # most people on linux use gcc/gdb, and that
27                                    # combo is not yet good at debugging inlined
28--- misc/nss-3.14.4/mozilla/security/coreconf/Darwin.mk	2010-02-04 19:59:10.000000000 +0100
29+++ misc/build/nss-3.14.4/mozilla/security/coreconf/Darwin.mk	2010-06-11 16:35:54.966185975 +0200
30@@ -5,10 +5,12 @@
31
32 include $(CORE_DEPTH)/coreconf/UNIX.mk
33
34-DEFAULT_COMPILER = gcc
35+DEFAULT_COMPILER = cc
36+
37+# CC is taken from environment automatically.
38+#CC		= cc
39+CCC		= $(CXX)
40
41-CC		= gcc
42-CCC		= g++
43 RANLIB		= ranlib
44
45 ifndef CPU_ARCH
46--- misc/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2010-01-15 23:19:00.000000000 +0100
47+++ misc/build/nss-3.14.4/mozilla/security/coreconf/Linux.mk	2010-06-11 16:35:54.981151732 +0200
48@@ -16,8 +16,11 @@
49 	IMPL_STRATEGY = _PTH
50 endif
51
52-CC			= gcc
53-CCC			= g++
54+# CC is taken from environment automatically.
55+#CC			= gcc
56+# Use CCC from environment.
57+#CCC			= g++
58+CCC		= $(CXX)
59 RANLIB			= ranlib
60
61 DEFAULT_COMPILER = gcc
62@@ -143,7 +146,7 @@
63 # incorrectly reports undefined references in the libraries we link with, so
64 # we don't use -z defs there.
65 ZDEFS_FLAG		= -Wl,-z,defs
66-DSO_LDOPTS		+= $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
67+DSO_LDOPTS		+= $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) '-Wl,-rpath,$$ORIGIN'
68 LDFLAGS			+= $(ARCHFLAG)
69
70 # On Maemo, we need to use the -rpath-link flag for even the standard system
71@@ -174,8 +177,13 @@
72 endif
73 endif
74
75+ifeq ($(SYSTEM_ZLIB),YES)
76+# Currently (3.12.4) only the tools modutil and signtool are linked with libz
77+# If USE_SYSTEM_ZLIB is not set then the tools link statically libzlib.a which
78+# is also build in nss.
79 USE_SYSTEM_ZLIB = 1
80 ZLIB_LIBS = -lz
81+endif
82
83 # The -rpath '$$ORIGIN' linker option instructs this library to search for its
84 # dependencies in the same directory where it resides.
85--- misc/nss-3.14.4/mozilla/security/coreconf/SunOS5.mk	2009-06-11 02:55:32.000000000 +0200
86+++ misc/build/nss-3.14.4/mozilla/security/coreconf/SunOS5.mk	2010-06-11 16:35:54.985571182 +0200
87@@ -48,8 +48,12 @@
88 	    # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
89 	endif
90 else
91-	CC         = cc
92-	CCC        = CC
93+# CC is taken from environment automatically.
94+#	CC         = cc
95+# Use CXX from environment.
96+#	CCC        = CC
97+        CCC       = $(CXX)
98+
99 	ASFLAGS   += -Wa,-P
100 	OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
101 	ifndef BUILD_OPT
102--- misc/nss-3.14.4/mozilla/security/coreconf/arch.mk	2009-06-05 04:14:49.000000000 +0200
103+++ misc/build/nss-3.14.4/mozilla/security/coreconf/arch.mk	2010-06-11 16:35:54.990913282 +0200
104@@ -302,7 +302,12 @@
105 # IMPL_STRATEGY may be defined too.
106 #
107
108-OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
109+# OBJDIR_NAME is used to build the directory containing the built objects, for
110+# example mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ
111+# We need to deliver the contents of that folder into the solver. To make that easier
112+# in the makefile we rename this directory to "out".
113+#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
114+OBJDIR_NAME = out
115
116 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
117 ifndef BUILD_OPT
118--- misc/nss-3.14.4/mozilla/security/coreconf/rules.mk	2009-12-08 02:33:36.000000000 +0100
119+++ misc/build/nss-3.14.4/mozilla/security/coreconf/rules.mk	2010-06-11 16:35:54.996448704 +0200
120@@ -318,7 +318,12 @@
121 ifdef NS_USE_GCC
122 	$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
123 else
124-	$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $<
125+        #We remove stl from the paths to avoid that rc.exe finds the stlport of
126+        #OOo. stlport includes the system stl which will fail. By removing it,
127+        #rc will use the stl from the system if the path is in the INCLUDE
128+        #variable.
129+	INCLUDE="$(subst /stl,,$(INCLUDE))" $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $<
130+
131 endif
132 	@echo $(RES) finished
133 endif
134--- misc/nss-3.14.4/mozilla/security/nss/cmd/platlibs.mk	2010-02-04 19:59:10.000000000 +0100
135+++ misc/build/nss-3.14.4/mozilla/security/nss/cmd/platlibs.mk	2010-06-11 16:35:55.004869805 +0200
136@@ -10,17 +10,18 @@
137
138 ifeq ($(OS_ARCH), SunOS)
139 ifeq ($(USE_64), 1)
140-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
141+#In AOO we would probable put the executables next to libs
142+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
143 else
144-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
145+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
146 endif
147 endif
148
149 ifeq ($(OS_ARCH), Linux)
150 ifeq ($(USE_64), 1)
151-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
152+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
153 else
154-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
155+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
156 endif
157 endif
158
159--- misc/nss-3.14.4/mozilla/security/nss/cmd/shlibsign/Makefile	2009-08-07 21:06:37.000000000 +0200
160+++ misc/build/nss-3.14.4/mozilla/security/nss/cmd/shlibsign/Makefile	2010-06-11 16:35:55.009851148 +0200
161@@ -46,10 +46,15 @@
162
163 # sign any and all shared libraries that contain the word freebl
164
165-CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
166-CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
167+# Signing causes loading of some system library which in turn loads
168+# libsqlite3. Then it loads libsqulite3 from nss, which does not have the proper
169+# version. Therefore signing fails.
170+# We cannot build with the system sqlite3, because it is too old (SDK
171+# 10.4). Otherwise one could set NSS_USE_SYSTEM_SQLITE=1 and use the system lib.
172+#CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
173+#CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
174 ifndef NSS_DISABLE_DBM
175-CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
176+#CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
177 endif
178 CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
179
180