1 --- a/a/nspr/configure 2017-08-29 23:44:13.686045013 +0530
2 +++ b/b/nspr/configure 2017-08-29 23:46:53.774768655 +0530
5 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
7 - DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
8 + DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@) $(if $(filter-out $(OS),ANDROID),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\$$ORIGIN)'
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 --- a/nss.orig/nspr/pr/src/misc/prnetdb.c 2017-08-29 23:44:13.690045031 +0530
13 +++ b/nss/nspr/pr/src/misc/prnetdb.c 2017-08-29 23:47:03.810814019 +0530
16 PRIntn buflen = *buflenp;
18 - if (align && ((long)buf & (align - 1))) {
19 + if (align && ((ptrdiff_t)buf & (align - 1))) {
20 PRIntn skip = align - ((ptrdiff_t)buf & (align - 1));
23 --- a/a/nss/cmd/platlibs.mk 2017-08-29 23:44:13.554044416 +0530
24 +++ b/b/nss/cmd/platlibs.mk 2017-08-29 23:46:09.638569150 +0530
27 ifeq ($(OS_ARCH), SunOS)
29 -EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
30 +#In OOo we would probable put the executables next to libs
31 +EXTRA_SHARED_LIBS += -R '$$ORIGIN'
33 -EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
34 +EXTRA_SHARED_LIBS += -R '$$ORIGIN'
38 +ifeq ($(OS_ARCH), FreeBSD)
39 +EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
42 ifeq ($(OS_ARCH), Linux)
44 -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
45 +EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
47 -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
48 +EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
52 --- a/nss.org/nss/coreconf/arch.mk 2017-08-29 23:44:13.646044832 +0530
53 +++ b/nss/nss/coreconf/arch.mk 2017-08-29 23:45:51.494487134 +0530
55 OBJDIR_NAME_COMPILER = $(COMPILER_TAG)
57 OBJDIR_NAME_BASE = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(OBJDIR_NAME_COMPILER)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG)
58 -OBJDIR_NAME = $(OBJDIR_NAME_BASE).OBJ
59 +# OBJDIR_NAME is used to build the directory containing the built objects, for
60 +# example mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ
61 +# We need to deliver the contents of that folder into instdir. To make that
62 +# easier in the makefile we rename this directory to "out".
63 +#OBJDIR_NAME = $(OBJDIR_NAME_BASE).OBJ
67 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
69 +ifdef THIS_HAS_BEEN_DISABLED_TO_GET_out
72 # Define USE_DEBUG_RTL if you want to use the debug runtime library
73 # (RTL) in the debug build
74 --- a/nss.org/nss/coreconf/FreeBSD.mk 2017-08-29 23:44:13.642044814 +0530
75 +++ b/nss/nss/coreconf/FreeBSD.mk 2017-08-29 23:45:20.850348615 +0530
79 DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@)
80 +DSO_LDOPTS += -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
83 # The default implementation strategy for FreeBSD is pthreads.
84 --- a/nss.org/nss/coreconf/Linux.mk 2017-08-29 23:44:13.642044814 +0530
85 +++ b/nss/nss/coreconf/Linux.mk 2017-08-29 23:47:26.318915759 +0530
87 # Also, -z defs conflicts with Address Sanitizer, which emits relocations
88 # against the libsanitizer runtime built into the main executable.
89 ZDEFS_FLAG = -Wl,-z,defs
90 -DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
91 +DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) $(if $(filter-out $(OS),ANDROID),-Wl$(COMMA)-z$(COMMA)origin '-Wl$(COMMA)-rpath$(COMMA)$$ORIGIN')
92 LDFLAGS += $(ARCHFLAG) -z noexecstack
94 # On Maemo, we need to use the -rpath-link flag for even the standard system
99 +ifneq ($(SYSTEM_ZLIB),)
100 +# Currently (3.12.4) only the tools modutil and signtool are linked with libz
101 +# If USE_SYSTEM_ZLIB is not set then the tools link statically libzlib.a which
102 +# is also built in nss.
107 # The -rpath '$$ORIGIN' linker option instructs this library to search for its
108 # dependencies in the same directory where it resides.
109 --- a/nss.org/nss/coreconf/rules.mk 2017-08-29 23:44:13.646044832 +0530
110 +++ b/nss/nss/coreconf/rules.mk 2017-08-29 23:47:37.442966042 +0530
112 ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
113 $(AR) $(subst /,\\,$(OBJS))
116 + $(AR) cr $@ $(OBJS)
120 --- a/nss.org/nss/coreconf/SunOS5.mk 2017-08-29 23:44:13.646044832 +0530
121 +++ b/nss/nss/coreconf/SunOS5.mk 2017-08-29 23:45:00.902258445 +0530
123 # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
128 + # CC is taken from environment automatically.
130 + # Use CXX from environment.
134 OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
136 --- a/nss.org/nss/coreconf/Werror.mk 2017-08-29 23:44:13.646044832 +0530
137 +++ b/nss/nss/coreconf/Werror.mk 2017-08-29 23:44:23.994091608 +0530
139 endif #ndef NSS_ENABLE_WERROR
141 ifeq ($(NSS_ENABLE_WERROR),1)
142 - WARNING_CFLAGS += -Werror
143 + # We do not treat warnings as errors.
144 + # WARNING_CFLAGS += -Werror
146 # Old versions of gcc (< 4.8) don't support #pragma diagnostic in functions.
147 # Use this to disable use of that #pragma and the warnings it suppresses.
148 --- a/nss.org/nss/Makefile 2017-08-29 23:44:13.402043729 +0530
149 +++ b/nss/nss/Makefile 2017-08-29 23:44:39.774162939 +0530
155 # This Source Code Form is subject to the terms of the Mozilla Public
157 NSPR_CONFIGURE_ENV = CC=gcc CXX=g++
160 -NSPR_CONFIGURE_ENV = CC=$(CC)
161 +NSPR_CONFIGURE_ENV = CC="$(CC) "
164 -NSPR_CONFIGURE_ENV += CXX=$(CCC)
165 +NSPR_CONFIGURE_ENV += CXX="$(CCC) "
167 # Remove -arch definitions. NSPR can't handle that.
168 NSPR_CONFIGURE_ENV := $(filter-out -arch x86_64,$(NSPR_CONFIGURE_ENV))