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