15ec3c564SDon Lewisdiff -ur misc/nss-3.39/nspr/configure misc/build/nss-3.39/nspr/configure 25ec3c564SDon Lewis--- misc/nss-3.39/nspr/configure 2018-08-28 05:42:28.000000000 -0700 3da9e167aSDon Lewis+++ misc/build/nss-3.39/nspr/configure 2020-10-06 07:41:59.563345390 -0700 45ec3c564SDon Lewis@@ -7039,7 +7039,7 @@ 5cdf0e10cSrcweir PR_MD_CSRCS=linux.c 6cdf0e10cSrcweir MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' 7cdf0e10cSrcweir DSO_CFLAGS=-fPIC 8cdf0e10cSrcweir- DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' 9cdf0e10cSrcweir+ DSO_LDOPTS='-shared -Wl,-rpath,\$$ORIGIN -Wl,-soname -Wl,$(notdir $@)' 10cdf0e10cSrcweir _OPTIMIZE_FLAGS=-O2 11cdf0e10cSrcweir _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that 12cdf0e10cSrcweir # combo is not yet good at debugging inlined 135ec3c564SDon Lewisdiff -ur misc/nss-3.39/nspr/pr/include/pratom.h misc/build/nss-3.39/nspr/pr/include/pratom.h 145ec3c564SDon Lewis--- misc/nss-3.39/nspr/pr/include/pratom.h 2018-08-28 05:42:28.000000000 -0700 15da9e167aSDon Lewis+++ misc/build/nss-3.39/nspr/pr/include/pratom.h 2020-10-06 07:41:59.563345390 -0700 16282fc96fStruckman@@ -81,7 +81,9 @@ 17282fc96fStruckman #if defined(_WIN32) && !defined(_WIN32_WCE) && \ 18282fc96fStruckman (!defined(_MSC_VER) || (_MSC_VER >= 1310)) 19cdf0e10cSrcweir 20282fc96fStruckman+PR_END_EXTERN_C 21282fc96fStruckman #include <intrin.h> 22282fc96fStruckman+PR_BEGIN_EXTERN_C 23282fc96fStruckman 24282fc96fStruckman #ifdef _MSC_VER 25282fc96fStruckman #pragma intrinsic(_InterlockedIncrement) 265ec3c564SDon Lewisdiff -ur misc/nss-3.39/nss/cmd/platlibs.mk misc/build/nss-3.39/nss/cmd/platlibs.mk 275ec3c564SDon Lewis--- misc/nss-3.39/nss/cmd/platlibs.mk 2018-08-31 05:55:53.000000000 -0700 28da9e167aSDon Lewis+++ misc/build/nss-3.39/nss/cmd/platlibs.mk 2020-10-06 07:41:59.567345437 -0700 29282fc96fStruckman@@ -10,17 +10,18 @@ 30282fc96fStruckman 31282fc96fStruckman ifeq ($(OS_ARCH), SunOS) 32282fc96fStruckman ifeq ($(USE_64), 1) 33282fc96fStruckman-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64' 34282fc96fStruckman+#In AOO we would probable put the executables next to libs 35282fc96fStruckman+EXTRA_SHARED_LIBS += -R '$$ORIGIN' 36282fc96fStruckman else 37282fc96fStruckman-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps' 38282fc96fStruckman+EXTRA_SHARED_LIBS += -R '$$ORIGIN' 39282fc96fStruckman endif 40282fc96fStruckman endif 41282fc96fStruckman 42282fc96fStruckman ifeq ($(OS_ARCH), Linux) 43282fc96fStruckman ifeq ($(USE_64), 1) 44282fc96fStruckman-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' 45282fc96fStruckman+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN' 46282fc96fStruckman else 47282fc96fStruckman-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' 48282fc96fStruckman+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN' 49282fc96fStruckman endif 50282fc96fStruckman endif 51282fc96fStruckman 525ec3c564SDon Lewisdiff -ur misc/nss-3.39/nss/cmd/shlibsign/Makefile misc/build/nss-3.39/nss/cmd/shlibsign/Makefile 535ec3c564SDon Lewis--- misc/nss-3.39/nss/cmd/shlibsign/Makefile 2018-08-31 05:55:53.000000000 -0700 54da9e167aSDon Lewis+++ misc/build/nss-3.39/nss/cmd/shlibsign/Makefile 2020-10-06 07:41:59.567345437 -0700 55282fc96fStruckman@@ -49,10 +49,15 @@ 56282fc96fStruckman CHECKLIBS = 57282fc96fStruckman CHECKLOC = 58282fc96fStruckman else 59282fc96fStruckman-CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX) 60282fc96fStruckman-CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX)) 61282fc96fStruckman+# Signing causes loading of some system library which in turn loads 62282fc96fStruckman+# libsqlite3. Then it loads libsqulite3 from nss, which does not have the proper 63282fc96fStruckman+# version. Therefore signing fails. 64282fc96fStruckman+# We cannot build with the system sqlite3, because it is too old (SDK 65282fc96fStruckman+# 10.4). Otherwise one could set NSS_USE_SYSTEM_SQLITE=1 and use the system lib. 66282fc96fStruckman+#CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX) 67282fc96fStruckman+#CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX)) 68282fc96fStruckman ifndef NSS_DISABLE_DBM 69282fc96fStruckman-CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX) 70282fc96fStruckman+#CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX) 71282fc96fStruckman endif 72282fc96fStruckman CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk) 73282fc96fStruckman 74da9e167aSDon Lewisdiff -ur misc/nss-3.39/nss/coreconf/Darwin.mk misc/build/nss-3.39/nss/coreconf/Darwin.mk 75da9e167aSDon Lewis--- misc/nss-3.39/nss/coreconf/Darwin.mk 2018-08-31 05:55:53.000000000 -0700 76da9e167aSDon Lewis+++ misc/build/nss-3.39/nss/coreconf/Darwin.mk 2020-10-06 07:51:49.590356560 -0700 77da9e167aSDon Lewis@@ -3,14 +3,15 @@ 78da9e167aSDon Lewis # License, v. 2.0. If a copy of the MPL was not distributed with this 79da9e167aSDon Lewis # file, You can obtain one at http://mozilla.org/MPL/2.0/. 80da9e167aSDon Lewis 81da9e167aSDon Lewis-CC ?= gcc 82da9e167aSDon Lewis-CCC ?= g++ 83da9e167aSDon Lewis+# CC is taken from environment automatically. 84da9e167aSDon Lewis+#CC ?= gcc 85*a46cde23SJim Jagielski+CCC ?= $(CXX) 86da9e167aSDon Lewis RANLIB ?= ranlib 87da9e167aSDon Lewis 88da9e167aSDon Lewis include $(CORE_DEPTH)/coreconf/UNIX.mk 89da9e167aSDon Lewis-include $(CORE_DEPTH)/coreconf/Werror.mk 90da9e167aSDon Lewis+#include $(CORE_DEPTH)/coreconf/Werror.mk 91da9e167aSDon Lewis 92da9e167aSDon Lewis-DEFAULT_COMPILER = gcc 93da9e167aSDon Lewis+DEFAULT_COMPILER = cc 94da9e167aSDon Lewis 95da9e167aSDon Lewis ifndef CPU_ARCH 96da9e167aSDon Lewis # When cross-compiling, CPU_ARCH should already be defined as the target 975ec3c564SDon Lewisdiff -ur misc/nss-3.39/nss/coreconf/FreeBSD.mk misc/build/nss-3.39/nss/coreconf/FreeBSD.mk 985ec3c564SDon Lewis--- misc/nss-3.39/nss/coreconf/FreeBSD.mk 2018-08-31 05:55:53.000000000 -0700 99da9e167aSDon Lewis+++ misc/build/nss-3.39/nss/coreconf/FreeBSD.mk 2020-10-06 07:41:59.567345437 -0700 100282fc96fStruckman@@ -5,9 +5,8 @@ 101282fc96fStruckman 102282fc96fStruckman include $(CORE_DEPTH)/coreconf/UNIX.mk 103282fc96fStruckman 104282fc96fStruckman-DEFAULT_COMPILER = gcc 105282fc96fStruckman-CC = gcc 106282fc96fStruckman-CCC = g++ 107282fc96fStruckman+DEFAULT_COMPILER = $(CC) 108282fc96fStruckman+CCC = $(CXX) 109282fc96fStruckman RANLIB = ranlib 110282fc96fStruckman 111282fc96fStruckman CPU_ARCH = $(OS_TEST) 112282fc96fStruckman@@ -21,7 +20,7 @@ 113282fc96fStruckman CPU_ARCH = x86_64 114282fc96fStruckman endif 115282fc96fStruckman 116282fc96fStruckman-OS_CFLAGS = $(DSO_CFLAGS) -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK 117282fc96fStruckman+OS_CFLAGS = $(DSO_CFLAGS) -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_UNISTD_H -DHAVE_BSD_FLOCK 118282fc96fStruckman 119282fc96fStruckman DSO_CFLAGS = -fPIC 120282fc96fStruckman DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@) 1215ec3c564SDon Lewisdiff -ur misc/nss-3.39/nss/coreconf/Linux.mk misc/build/nss-3.39/nss/coreconf/Linux.mk 1225ec3c564SDon Lewis--- misc/nss-3.39/nss/coreconf/Linux.mk 2018-08-31 05:55:53.000000000 -0700 123da9e167aSDon Lewis+++ misc/build/nss-3.39/nss/coreconf/Linux.mk 2020-10-06 07:41:59.567345437 -0700 1245ec3c564SDon Lewis@@ -140,7 +140,7 @@ 125282fc96fStruckman endif 126282fc96fStruckman 127282fc96fStruckman DSO_CFLAGS = -fPIC 128282fc96fStruckman-DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections 129282fc96fStruckman+DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections '-Wl,-rpath,$$ORIGIN' 130282fc96fStruckman # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8) 131cdf0e10cSrcweir # incorrectly reports undefined references in the libraries we link with, so 132cdf0e10cSrcweir # we don't use -z defs there. 1335ec3c564SDon Lewis@@ -177,8 +177,13 @@ 134c38ced1bSHerbert Dürr endif 135c38ced1bSHerbert Dürr endif 136cdf0e10cSrcweir 137cdf0e10cSrcweir+ifeq ($(SYSTEM_ZLIB),YES) 138cdf0e10cSrcweir+# Currently (3.12.4) only the tools modutil and signtool are linked with libz 139cdf0e10cSrcweir+# If USE_SYSTEM_ZLIB is not set then the tools link statically libzlib.a which 140cdf0e10cSrcweir+# is also build in nss. 141cdf0e10cSrcweir USE_SYSTEM_ZLIB = 1 142cdf0e10cSrcweir ZLIB_LIBS = -lz 143cdf0e10cSrcweir+endif 144cdf0e10cSrcweir 145cdf0e10cSrcweir # The -rpath '$$ORIGIN' linker option instructs this library to search for its 146cdf0e10cSrcweir # dependencies in the same directory where it resides. 147da9e167aSDon Lewisdiff -ur misc/nss-3.39/nss/coreconf/rules.mk misc/build/nss-3.39/nss/coreconf/rules.mk 148da9e167aSDon Lewis--- misc/nss-3.39/nss/coreconf/rules.mk 2018-08-31 05:55:53.000000000 -0700 149da9e167aSDon Lewis+++ misc/build/nss-3.39/nss/coreconf/rules.mk 2020-10-06 07:41:59.567345437 -0700 150da9e167aSDon Lewis@@ -322,7 +322,12 @@ 151da9e167aSDon Lewis ifdef NS_USE_GCC 152da9e167aSDon Lewis $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $< 153da9e167aSDon Lewis else 154da9e167aSDon Lewis- $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $< 155da9e167aSDon Lewis+ #We remove stl from the paths to avoid that rc.exe finds the stlport of 156da9e167aSDon Lewis+ #OOo. stlport includes the system stl which will fail. By removing it, 157da9e167aSDon Lewis+ #rc will use the stl from the system if the path is in the INCLUDE 158da9e167aSDon Lewis+ #variable. 159da9e167aSDon Lewis+ INCLUDE="$(subst /stl,,$(INCLUDE))" $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $< 160da9e167aSDon Lewis+ 161da9e167aSDon Lewis endif 162da9e167aSDon Lewis @echo $(RES) finished 163da9e167aSDon Lewis endif 1645ec3c564SDon Lewisdiff -ur misc/nss-3.39/nss/coreconf/SunOS5.mk misc/build/nss-3.39/nss/coreconf/SunOS5.mk 1655ec3c564SDon Lewis--- misc/nss-3.39/nss/coreconf/SunOS5.mk 2018-08-31 05:55:53.000000000 -0700 166da9e167aSDon Lewis+++ misc/build/nss-3.39/nss/coreconf/SunOS5.mk 2020-10-06 07:41:59.567345437 -0700 167c38ced1bSHerbert Dürr@@ -48,8 +48,12 @@ 168cdf0e10cSrcweir # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer 169cdf0e10cSrcweir endif 170cdf0e10cSrcweir else 171cdf0e10cSrcweir- CC = cc 172cdf0e10cSrcweir- CCC = CC 173cdf0e10cSrcweir+# CC is taken from environment automatically. 174cdf0e10cSrcweir+# CC = cc 175cdf0e10cSrcweir+# Use CXX from environment. 176cdf0e10cSrcweir+# CCC = CC 177cdf0e10cSrcweir+ CCC = $(CXX) 178cdf0e10cSrcweir+ 179cdf0e10cSrcweir ASFLAGS += -Wa,-P 180cdf0e10cSrcweir OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG) 181cdf0e10cSrcweir ifndef BUILD_OPT 1825ec3c564SDon Lewisdiff -ur misc/nss-3.39/nss/lib/zlib/inflate.c misc/build/nss-3.39/nss/lib/zlib/inflate.c 1835ec3c564SDon Lewis--- misc/nss-3.39/nss/lib/zlib/inflate.c 2018-08-31 05:55:53.000000000 -0700 184da9e167aSDon Lewis+++ misc/build/nss-3.39/nss/lib/zlib/inflate.c 2020-10-06 07:41:59.567345437 -0700 185282fc96fStruckman@@ -1472,9 +1472,9 @@ 186282fc96fStruckman { 187282fc96fStruckman struct inflate_state FAR *state; 188cdf0e10cSrcweir 189282fc96fStruckman- if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; 190282fc96fStruckman+ if (strm == Z_NULL || strm->state == Z_NULL) return ~0UL << 16; 191282fc96fStruckman state = (struct inflate_state FAR *)strm->state; 192282fc96fStruckman- return ((long)(state->back) << 16) + 193282fc96fStruckman+ return ((unsigned long)(state->back) << 16) + 194282fc96fStruckman (state->mode == COPY ? state->length : 195282fc96fStruckman (state->mode == MATCH ? state->was - state->length : 0)); 196282fc96fStruckman } 197da9e167aSDon Lewisdiff -ur misc/nss-3.39/nss/Makefile misc/build/nss-3.39/nss/Makefile 198da9e167aSDon Lewis--- misc/nss-3.39/nss/Makefile 2018-08-31 05:55:53.000000000 -0700 199da9e167aSDon Lewis+++ misc/build/nss-3.39/nss/Makefile 2020-10-06 07:41:59.567345437 -0700 200da9e167aSDon Lewis@@ -77,6 +77,9 @@ 201da9e167aSDon Lewis ifeq ($(OS_TARGET),WIN95) 202da9e167aSDon Lewis NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95 203da9e167aSDon Lewis endif 204da9e167aSDon Lewis+ifdef MACOS_SDK_DIR 205da9e167aSDon Lewis+NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR) 206da9e167aSDon Lewis+endif 207da9e167aSDon Lewis ifdef USE_DEBUG_RTL 208da9e167aSDon Lewis NSPR_CONFIGURE_OPTS += --enable-debug-rtl 209da9e167aSDon Lewis endif 210