fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / nss / nss.patch
blobe555d6eb7ab181f4ec9b10598811e817dae4fbe0
1 diff -ru a/nspr/configure b/nspr/configure
2 --- a/a/nspr/configure 2014-09-29 16:46:38.427423757 +0100
3 +++ b/b/nspr/configure 2014-09-29 16:47:42.984012225 +0100
4 @@ -7018,7 +7018,7 @@
5 PR_MD_CSRCS=linux.c
6 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
7 DSO_CFLAGS=-fPIC
8 - DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
9 + DSO_LDOPTS='-shared -Wl,-z,origin -Wl,-rpath,\$$ORIGIN -Wl,-soname -Wl,$(notdir $@)'
10 _OPTIMIZE_FLAGS=-O2
11 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
12 # combo is not yet good at debugging inlined
13 diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
14 --- a/a/nss/cmd/platlibs.mk 2014-09-29 16:46:38.306422654 +0100
15 +++ b/b/nss/cmd/platlibs.mk 2014-09-29 16:47:42.987012253 +0100
16 @@ -10,17 +10,22 @@
18 ifeq ($(OS_ARCH), SunOS)
19 ifeq ($(USE_64), 1)
20 -EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
21 +#In OOo we would probable put the executables next to libs
22 +EXTRA_SHARED_LIBS += -R '$$ORIGIN'
23 else
24 -EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
25 +EXTRA_SHARED_LIBS += -R '$$ORIGIN'
26 endif
27 endif
29 +ifeq ($(OS_ARCH), FreeBSD)
30 +EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
31 +endif
33 ifeq ($(OS_ARCH), Linux)
34 ifeq ($(USE_64), 1)
35 -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
36 +EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
37 else
38 -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
39 +EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
40 endif
41 endif
43 diff -ru a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk
44 --- a/a/nss/coreconf/arch.mk 2014-09-29 16:46:38.175421471 +0100
45 +++ b/b/nss/coreconf/arch.mk 2014-09-29 16:47:42.986012244 +0100
46 @@ -280,10 +280,15 @@
47 # IMPL_STRATEGY may be defined too.
50 -OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
51 +# OBJDIR_NAME is used to build the directory containing the built objects, for
52 +# example mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ
53 +# We need to deliver the contents of that folder into instdir. To make that
54 +# easier in the makefile we rename this directory to "out".
55 +#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
56 +OBJDIR_NAME = out
58 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
59 -ifndef BUILD_OPT
60 +ifdef THIS_HAS_BEEN_DISABLED_TO_GET_out
62 # Define USE_DEBUG_RTL if you want to use the debug runtime library
63 # (RTL) in the debug build
64 diff -ru a/nss/coreconf/FreeBSD.mk b/nss/coreconf/FreeBSD.mk
65 --- a/a/nss/coreconf/FreeBSD.mk 2014-09-29 16:46:38.189421588 +0100
66 +++ b/b/nss/coreconf/FreeBSD.mk 2014-09-29 16:47:42.984012225 +0100
67 @@ -25,6 +25,7 @@
69 DSO_CFLAGS = -fPIC
70 DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@)
71 +DSO_LDOPTS += -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
74 # The default implementation strategy for FreeBSD is pthreads.
75 diff -ru a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk
76 --- a/a/nss/coreconf/Linux.mk 2014-09-29 16:46:38.189421588 +0100
77 +++ b/b/nss/coreconf/Linux.mk 2014-09-29 16:47:42.985012235 +0100
78 @@ -16,8 +16,11 @@
79 IMPL_STRATEGY = _PTH
80 endif
82 -CC = gcc
83 -CCC = g++
84 +# CC is taken from environment automatically.
85 +#CC = gcc
86 +# Use CCC from environment.
87 +#CCC = g++
88 +CCC = $(CXX)
89 RANLIB = ranlib
91 DEFAULT_COMPILER = gcc
92 @@ -145,7 +148,7 @@
93 # incorrectly reports undefined references in the libraries we link with, so
94 # we don't use -z defs there.
95 ZDEFS_FLAG = -Wl,-z,defs
96 -DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
97 +DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
98 LDFLAGS += $(ARCHFLAG)
100 # On Maemo, we need to use the -rpath-link flag for even the standard system
101 @@ -176,8 +179,13 @@
102 endif
103 endif
105 +ifneq ($(SYSTEM_ZLIB),)
106 +# Currently (3.12.4) only the tools modutil and signtool are linked with libz
107 +# If USE_SYSTEM_ZLIB is not set then the tools link statically libzlib.a which
108 +# is also built in nss.
109 USE_SYSTEM_ZLIB = 1
110 ZLIB_LIBS = -lz
111 +endif
113 # The -rpath '$$ORIGIN' linker option instructs this library to search for its
114 # dependencies in the same directory where it resides.
115 diff -ru a/nss/coreconf/rules.mk b/nss/coreconf/rules.mk
116 --- a/a/nss/coreconf/rules.mk 2014-09-29 16:46:38.188421578 +0100
117 +++ b/b/nss/coreconf/rules.mk 2014-09-29 16:47:42.986012244 +0100
118 @@ -261,7 +261,7 @@
119 ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
120 $(AR) $(subst /,\\,$(OBJS))
121 else
122 - $(AR) $(OBJS)
123 + $(AR) cr $@ $(OBJS)
124 endif
125 $(RANLIB) $@
127 diff -ru a/nss/coreconf/SunOS5.mk b/nss/coreconf/SunOS5.mk
128 --- a/a/nss/coreconf/SunOS5.mk 2014-09-29 16:46:38.175421471 +0100
129 +++ b/b/nss/coreconf/SunOS5.mk 2014-09-29 16:47:42.985012235 +0100
130 @@ -48,8 +48,12 @@
131 # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
132 endif
133 else
134 - CC = cc
135 - CCC = CC
136 +# CC is taken from environment automatically.
137 +# CC = cc
138 +# Use CXX from environment.
139 +# CCC = CC
140 + CCC = $(CXX)
142 ASFLAGS += -Wa,-P
143 OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
144 ifndef BUILD_OPT
145 diff -ru a/nss/Makefile b/nss/Makefile
146 --- a/a/nss/Makefile 2014-09-29 16:46:38.171421425 +0100
147 +++ b/b/nss/Makefile 2014-09-29 16:47:42.987012253 +0100
148 @@ -1,3 +1,5 @@
149 +export AR
150 +export RANLIB
151 #! gmake
153 # This Source Code Form is subject to the terms of the Mozilla Public