113effbfbSDon Lewisdiff -ur misc/nss-3.39/nspr/configure misc/build/nss-3.39/nspr/configure 213effbfbSDon Lewis--- misc/nss-3.39/nspr/configure 2018-08-28 05:42:28.000000000 -0700 32034d942SDon Lewis+++ misc/build/nss-3.39/nspr/configure 2020-10-06 07:41:59.563345390 -0700 413effbfbSDon 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 1313effbfbSDon Lewisdiff -ur misc/nss-3.39/nspr/pr/include/pratom.h misc/build/nss-3.39/nspr/pr/include/pratom.h 1413effbfbSDon Lewis--- misc/nss-3.39/nspr/pr/include/pratom.h 2018-08-28 05:42:28.000000000 -0700 152034d942SDon 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) 2613effbfbSDon Lewisdiff -ur misc/nss-3.39/nss/cmd/platlibs.mk misc/build/nss-3.39/nss/cmd/platlibs.mk 2713effbfbSDon Lewis--- misc/nss-3.39/nss/cmd/platlibs.mk 2018-08-31 05:55:53.000000000 -0700 282034d942SDon 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 5213effbfbSDon Lewisdiff -ur misc/nss-3.39/nss/cmd/shlibsign/Makefile misc/build/nss-3.39/nss/cmd/shlibsign/Makefile 5313effbfbSDon Lewis--- misc/nss-3.39/nss/cmd/shlibsign/Makefile 2018-08-31 05:55:53.000000000 -0700 542034d942SDon 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 742034d942SDon Lewisdiff -ur misc/nss-3.39/nss/coreconf/Darwin.mk misc/build/nss-3.39/nss/coreconf/Darwin.mk 752034d942SDon Lewis--- misc/nss-3.39/nss/coreconf/Darwin.mk 2018-08-31 05:55:53.000000000 -0700 762034d942SDon Lewis+++ misc/build/nss-3.39/nss/coreconf/Darwin.mk 2020-10-06 07:51:49.590356560 -0700 772034d942SDon Lewis@@ -3,14 +3,15 @@ 782034d942SDon Lewis # License, v. 2.0. If a copy of the MPL was not distributed with this 792034d942SDon Lewis # file, You can obtain one at http://mozilla.org/MPL/2.0/. 802034d942SDon Lewis 812034d942SDon Lewis-CC ?= gcc 822034d942SDon Lewis-CCC ?= g++ 832034d942SDon Lewis+# CC is taken from environment automatically. 842034d942SDon Lewis+#CC ?= gcc 85*8cbbd4e8SJim Jagielski+CCC ?= $(CXX) 862034d942SDon Lewis RANLIB ?= ranlib 872034d942SDon Lewis 882034d942SDon Lewis include $(CORE_DEPTH)/coreconf/UNIX.mk 892034d942SDon Lewis-include $(CORE_DEPTH)/coreconf/Werror.mk 902034d942SDon Lewis+#include $(CORE_DEPTH)/coreconf/Werror.mk 912034d942SDon Lewis 922034d942SDon Lewis-DEFAULT_COMPILER = gcc 932034d942SDon Lewis+DEFAULT_COMPILER = cc 942034d942SDon Lewis 952034d942SDon Lewis ifndef CPU_ARCH 962034d942SDon Lewis # When cross-compiling, CPU_ARCH should already be defined as the target 9713effbfbSDon Lewisdiff -ur misc/nss-3.39/nss/coreconf/FreeBSD.mk misc/build/nss-3.39/nss/coreconf/FreeBSD.mk 9813effbfbSDon Lewis--- misc/nss-3.39/nss/coreconf/FreeBSD.mk 2018-08-31 05:55:53.000000000 -0700 992034d942SDon 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 $@) 12113effbfbSDon Lewisdiff -ur misc/nss-3.39/nss/coreconf/Linux.mk misc/build/nss-3.39/nss/coreconf/Linux.mk 12213effbfbSDon Lewis--- misc/nss-3.39/nss/coreconf/Linux.mk 2018-08-31 05:55:53.000000000 -0700 1232034d942SDon Lewis+++ misc/build/nss-3.39/nss/coreconf/Linux.mk 2020-10-06 07:41:59.567345437 -0700 12413effbfbSDon 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. 13313effbfbSDon 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. 1472034d942SDon Lewisdiff -ur misc/nss-3.39/nss/coreconf/rules.mk misc/build/nss-3.39/nss/coreconf/rules.mk 1482034d942SDon Lewis--- misc/nss-3.39/nss/coreconf/rules.mk 2018-08-31 05:55:53.000000000 -0700 1492034d942SDon Lewis+++ misc/build/nss-3.39/nss/coreconf/rules.mk 2020-10-06 07:41:59.567345437 -0700 1502034d942SDon Lewis@@ -322,7 +322,12 @@ 1512034d942SDon Lewis ifdef NS_USE_GCC 1522034d942SDon Lewis $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $< 1532034d942SDon Lewis else 1542034d942SDon Lewis- $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $< 1552034d942SDon Lewis+ #We remove stl from the paths to avoid that rc.exe finds the stlport of 1562034d942SDon Lewis+ #OOo. stlport includes the system stl which will fail. By removing it, 1572034d942SDon Lewis+ #rc will use the stl from the system if the path is in the INCLUDE 1582034d942SDon Lewis+ #variable. 1592034d942SDon Lewis+ INCLUDE="$(subst /stl,,$(INCLUDE))" $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $< 1602034d942SDon Lewis+ 1612034d942SDon Lewis endif 1622034d942SDon Lewis @echo $(RES) finished 1632034d942SDon Lewis endif 16413effbfbSDon Lewisdiff -ur misc/nss-3.39/nss/coreconf/SunOS5.mk misc/build/nss-3.39/nss/coreconf/SunOS5.mk 16513effbfbSDon Lewis--- misc/nss-3.39/nss/coreconf/SunOS5.mk 2018-08-31 05:55:53.000000000 -0700 1662034d942SDon 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 18213effbfbSDon Lewisdiff -ur misc/nss-3.39/nss/lib/zlib/inflate.c misc/build/nss-3.39/nss/lib/zlib/inflate.c 18313effbfbSDon Lewis--- misc/nss-3.39/nss/lib/zlib/inflate.c 2018-08-31 05:55:53.000000000 -0700 1842034d942SDon 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 } 1972034d942SDon Lewisdiff -ur misc/nss-3.39/nss/Makefile misc/build/nss-3.39/nss/Makefile 1982034d942SDon Lewis--- misc/nss-3.39/nss/Makefile 2018-08-31 05:55:53.000000000 -0700 1992034d942SDon Lewis+++ misc/build/nss-3.39/nss/Makefile 2020-10-06 07:41:59.567345437 -0700 2002034d942SDon Lewis@@ -77,6 +77,9 @@ 2012034d942SDon Lewis ifeq ($(OS_TARGET),WIN95) 2022034d942SDon Lewis NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95 2032034d942SDon Lewis endif 2042034d942SDon Lewis+ifdef MACOS_SDK_DIR 2052034d942SDon Lewis+NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR) 2062034d942SDon Lewis+endif 2072034d942SDon Lewis ifdef USE_DEBUG_RTL 2082034d942SDon Lewis NSPR_CONFIGURE_OPTS += --enable-debug-rtl 2092034d942SDon Lewis endif 210