update credits
[LibreOffice.git] / nss / nss.patch
blobca8106141c36c8a859a870d3ba006d2efbf5a15a
1 --- misc/nss-3.13.5/mozilla/nsprpub/configure 2010-02-08 19:41:35.000000000 +0100
2 +++ misc/build/nss-3.13.5/mozilla/nsprpub/configure 2010-06-11 16:35:54.960188991 +0200
3 @@ -3900,7 +3900,7 @@
4 PR_MD_CSRCS=linux.c
5 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
6 DSO_CFLAGS=-fPIC
7 - DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
8 + DSO_LDOPTS='-shared -Wl,-z,origin -Wl,-rpath,\$$ORIGIN -Wl,-soname -Wl,$(notdir $@)'
9 _OPTIMIZE_FLAGS=-O2
10 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
11 # combo is not yet good at debugging inlined
12 --- misc/nss-3.13.5/mozilla/security/coreconf/Darwin.mk 2010-02-04 19:59:10.000000000 +0100
13 +++ misc/build/nss-3.13.5/mozilla/security/coreconf/Darwin.mk 2010-06-11 16:35:54.966185975 +0200
14 @@ -39,8 +39,12 @@
16 DEFAULT_COMPILER = cc
18 -CC = gcc
19 -CCC = g++
20 +# CC is taken from environment automatically.
21 +#CC = cc
22 +# Use CCC from environment.
23 +#CCC = c++
24 +CCC = $(CXX)
26 RANLIB = ranlib
28 ifndef CPU_ARCH
29 @@ -57,19 +57,25 @@
31 ifeq (,$(filter-out i%86,$(CPU_ARCH)))
32 ifdef USE_64
33 +ifeq (,$(findstring -arch ,$(CC)))
34 CC += -arch x86_64
35 +endif
36 override CPU_ARCH = x86_64
37 else
38 OS_REL_CFLAGS = -Di386
39 +ifeq (,$(findstring -arch ,$(CC)))
40 CC += -arch i386
41 +endif
42 override CPU_ARCH = x86
43 endif
44 else
45 ifeq (arm,$(CPU_ARCH))
46 # Nothing set for arm currently.
47 else
48 OS_REL_CFLAGS = -Dppc
49 +ifeq (,$(findstring -arch ,$(CC)))
50 CC += -arch ppc
51 +endif
52 endif
53 endif
55 --- misc/nss-3.13.5/mozilla/security/coreconf/FreeBSD.mk 2009-11-23 05:06:29.000000000 -0500
56 +++ misc/build/nss-3.13.5/mozilla/security/coreconf/FreeBSD.mk 2012-08-28 20:27:20.000000000 -0400
57 @@ -57,6 +57,7 @@
59 DSO_CFLAGS = -fPIC
60 DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@)
61 +DSO_LDOPTS += -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
64 # The default implementation strategy for FreeBSD is pthreads.
65 --- misc/nss-3.13.5/mozilla/security/coreconf/Linux.mk 2010-01-15 23:19:00.000000000 +0100
66 +++ misc/build/nss-3.13.5/mozilla/security/coreconf/Linux.mk 2010-06-11 16:35:54.981151732 +0200
67 @@ -46,8 +46,11 @@
68 IMPL_STRATEGY = _PTH
69 endif
71 -CC = gcc
72 -CCC = g++
73 +# CC is taken from environment automatically.
74 +#CC = gcc
75 +# Use CCC from environment.
76 +#CCC = g++
77 +CCC = $(CXX)
78 RANLIB = ranlib
80 DEFAULT_COMPILER = gcc
81 @@ -147,7 +150,7 @@
82 # incorrectly reports undefined references in the libraries we link with, so
83 # we don't use -z defs there.
84 ZDEFS_FLAG = -Wl,-z,defs
85 -DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
86 +DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
87 LDFLAGS += $(ARCHFLAG)
89 # INCLUDES += -I/usr/include -Y/usr/include/linux
90 @@ -158,8 +161,13 @@
92 CPU_TAG = _$(CPU_ARCH)
94 +ifeq ($(SYSTEM_ZLIB),YES)
95 +# Currently (3.12.4) only the tools modutil and signtool are linked with libz
96 +# If USE_SYSTEM_ZLIB is not set then the tools link statically libzlib.a which
97 +# is also build in nss.
98 USE_SYSTEM_ZLIB = 1
99 ZLIB_LIBS = -lz
100 +endif
102 # The -rpath '$$ORIGIN' linker option instructs this library to search for its
103 # dependencies in the same directory where it resides.
104 --- misc/nss-3.13.5/mozilla/security/coreconf/SunOS5.mk 2009-06-11 02:55:32.000000000 +0200
105 +++ misc/build/nss-3.13.5/mozilla/security/coreconf/SunOS5.mk 2010-06-11 16:35:54.985571182 +0200
106 @@ -89,8 +89,12 @@
107 # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
108 endif
109 else
110 - CC = cc
111 - CCC = CC
112 +# CC is taken from environment automatically.
113 +# CC = cc
114 +# Use CXX from environment.
115 +# CCC = CC
116 + CCC = $(CXX)
118 ASFLAGS += -Wa,-P
119 OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
120 ifndef BUILD_OPT
121 --- misc/nss-3.13.5/mozilla/security/coreconf/arch.mk 2009-06-05 04:14:49.000000000 +0200
122 +++ misc/build/nss-3.13.5/mozilla/security/coreconf/arch.mk 2010-06-11 16:35:54.990913282 +0200
123 @@ -324,10 +324,15 @@
124 # IMPL_STRATEGY may be defined too.
127 -OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
128 +# OBJDIR_NAME is used to build the directory containing the built objects, for
129 +# example mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ
130 +# We need to deliver the contents of that folder into the solver. To make that easier
131 +# in the makefile we rename this directory to "out".
132 +#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
133 +OBJDIR_NAME = out
135 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
136 -ifndef BUILD_OPT
137 +ifdef THIS_HAS_BEEN_DISABLED_TO_GET_out
139 # Define USE_DEBUG_RTL if you want to use the debug runtime library
140 # (RTL) in the debug build
141 --- misc/nss-3.13.5/mozilla/security/nss/cmd/platlibs.mk 2010-02-04 19:59:10.000000000 +0100
142 +++ misc/build/nss-3.13.5/mozilla/security/nss/cmd/platlibs.mk 2010-06-11 16:35:55.004869805 +0200
143 @@ -41,27 +41,32 @@
144 ifeq ($(OS_ARCH), SunOS)
145 ifeq ($(BUILD_SUN_PKG), 1)
146 ifeq ($(USE_64), 1)
147 -EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
148 +#In OOo we would probable put the executables next to libs
149 +EXTRA_SHARED_LIBS += -R '$$ORIGIN'
150 else
151 -EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
152 +EXTRA_SHARED_LIBS += -R '$$ORIGIN'
153 endif
154 else
155 -EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib'
156 +EXTRA_SHARED_LIBS += -R '$$ORIGIN'
157 endif
158 endif
160 +ifeq ($(OS_ARCH), FreeBSD)
161 +EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
162 +endif
164 ifeq ($(OS_ARCH), Linux)
165 ifeq ($(BUILD_SUN_PKG), 1)
166 ifeq ($(USE_64), 1)
167 -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
168 +EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
169 else
170 -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
171 +EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
172 endif
173 else
174 ifeq ($(USE_64), 1)
175 -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib'
176 +EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
177 else
178 -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib'
179 +EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
180 endif
181 endif
182 endif
183 --- misc/nss-3.13.5/mozilla/security/nss/cmd/shlibsign/Makefile 2009-08-07 21:06:37.000000000 +0200
184 +++ misc/build/nss-3.13.5/mozilla/security/nss/cmd/shlibsign/Makefile 2010-06-11 16:35:55.009851148 +0200
185 @@ -78,10 +78,15 @@
187 # sign any and all shared libraries that contain the word freebl
189 -CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
190 -CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
191 +# Signing causes loading of some system library which in turn loads
192 +# libsqlite3. Then it loads libsqulite3 from nss, which does not have the proper
193 +# version. Therefore signing fails.
194 +# We cannot build with the system sqlite3, because it is too old (SDK
195 +# 10.4). Otherwise one could set NSS_USE_SYSTEM_SQLITE=1 and use the system lib.
196 +#CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
197 +#CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
198 ifndef NSS_DISABLE_DBM
199 -CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
200 +#CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX)
201 endif
202 CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
204 --- misc/nss-3.13.5/mozilla/security/coreconf/Darwin.mk
205 +++ misc/build/nss-3.13.5/mozilla/security/coreconf/Darwin.mk
206 @@ -64,12 +64,16 @@
207 endif
209 ifneq (,$(MACOS_SDK_DIR))
210 + CLANG_VERSION_FULL := $(shell $(CC) -v 2>&1 | grep "clang version" | sed -e "s/^.*clang version[ ]*//" | awk '{ print $$1 }')
211 GCC_VERSION_FULL := $(shell $(CC) -dumpversion)
212 GCC_VERSION_MAJOR := $(shell echo $(GCC_VERSION_FULL) | awk -F. '{ print $$1 }')
213 GCC_VERSION_MINOR := $(shell echo $(GCC_VERSION_FULL) | awk -F. '{ print $$2 }')
214 GCC_VERSION = $(GCC_VERSION_MAJOR).$(GCC_VERSION_MINOR)
215 + ifneq (,$(CLANG_VERSION_FULL))
216 + DARWIN_SDK_CFLAGS = -isysroot $(MACOS_SDK_DIR)
217 + DARWIN_SDK_SHLIBFLAGS = -isysroot $(MACOS_SDK_DIR)
219 - ifeq (,$(filter-out 2 3,$(GCC_VERSION_MAJOR)))
220 + else ifeq (,$(filter-out 2 3,$(GCC_VERSION_MAJOR)))
221 # GCC <= 3
222 DARWIN_SDK_FRAMEWORKS = -F$(MACOS_SDK_DIR)/System/Library/Frameworks
223 ifneq (,$(shell find $(MACOS_SDK_DIR)/Library/Frameworks -maxdepth 0))