office-gobmx/external/nss/nss_macosx.patch
Michael Stahl 0cdf41419a nss: upgrade to release 3.29.5
- fixes CVE-2017-5461 and CVE-2017-5462
- drop ubsan-alignment.patch.0, there is apparently now some
  NO_SANITIZE_ALIGNMENT macro upstream to get this effect
- drop some hunks to prevent hard-coding CC/CCC vars, upstream now
  respects environment vars (but doesn't quote them...)
- drop first hunk of ubsan.patch.0, fixed upstream
- drop hunk for gtest-internal.h, header looks much newer anyway

Change-Id: I5c484c02c1235e185af1ef5166b069303d3378e1
Reviewed-on: https://gerrit.libreoffice.org/36756
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-04-21 14:15:17 +02:00

73 lines
3 KiB
Diff

diff -ru a/nspr/configure b/nspr/configure
--- a/a/nspr/configure 2014-09-29 16:50:33.907375937 +0100
+++ b/b/nspr/configure 2014-09-29 16:51:59.213931947 +0100
@@ -6577,7 +6579,7 @@
DSO_CFLAGS=-fPIC
- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
+ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @__________________________________________________OOO/$@ -headerpad_max_install_names'
_OPTIMIZE_FLAGS=-O2
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
STRIP="$STRIP -x -S"
diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
--- a/a/nss/coreconf/Darwin.mk 2014-09-29 16:50:22.992304799 +0100
+++ b/b/nss/coreconf/Darwin.mk 2014-09-29 16:51:59.214931953 +0100
@@ -20,13 +24,17 @@
ifeq (,$(filter-out i%86,$(CPU_ARCH)))
ifdef USE_64
+ifeq (,$(findstring -arch ,$(CC)))
CC += -arch x86_64
CCC += -arch x86_64
+endif
override CPU_ARCH = x86_64
else
OS_REL_CFLAGS = -Di386
+ifeq (,$(findstring -arch ,$(CC)))
CC += -arch i386
CCC += -arch i386
+endif
override CPU_ARCH = x86
endif
else
@@ -40,12 +48,16 @@
endif
ifneq (,$(MACOS_SDK_DIR))
+ CLANG_VERSION_FULL := $(shell $(CC) -v 2>&1 | grep "clang version" | sed -e "s/^.*clang version[ ]*//" | awk '{ print $$1 }')
GCC_VERSION_FULL := $(shell $(CC) -dumpversion)
GCC_VERSION_MAJOR := $(shell echo $(GCC_VERSION_FULL) | awk -F. '{ print $$1 }')
GCC_VERSION_MINOR := $(shell echo $(GCC_VERSION_FULL) | awk -F. '{ print $$2 }')
GCC_VERSION = $(GCC_VERSION_MAJOR).$(GCC_VERSION_MINOR)
+ ifneq (,$(CLANG_VERSION_FULL))
+ DARWIN_SDK_CFLAGS = -isysroot $(MACOS_SDK_DIR)
+ DARWIN_SDK_SHLIBFLAGS = -isysroot $(MACOS_SDK_DIR)
- ifeq (,$(filter-out 2 3,$(GCC_VERSION_MAJOR)))
+ else ifeq (,$(filter-out 2 3,$(GCC_VERSION_MAJOR)))
# GCC <= 3
DARWIN_SDK_FRAMEWORKS = -F$(MACOS_SDK_DIR)/System/Library/Frameworks
ifneq (,$(shell find $(MACOS_SDK_DIR)/Library/Frameworks -maxdepth 0))
@@ -108,7 +120,7 @@
# May override this with different compatibility and current version numbers.
DARWIN_DYLIB_VERSIONS = -compatibility_version 1 -current_version 1
# May override this with -bundle to create a loadable module.
-DSO_LDOPTS = -dynamiclib $(DARWIN_DYLIB_VERSIONS) -install_name @executable_path/$(notdir $@) -headerpad_max_install_names
+DSO_LDOPTS = -dynamiclib $(DARWIN_DYLIB_VERSIONS) -install_name @__________________________________________________OOO/$(notdir $@) -headerpad_max_install_names
ifdef USE_GCOV
OS_CFLAGS += --coverage
diff -ru a/nss/Makefile b/nss/Makefile
--- a/a/nss/Makefile 2014-09-29 16:50:22.990304789 +0100
+++ b/b/nss/Makefile 2014-09-29 16:51:59.207931908 +0100
@@ -72,6 +72,9 @@
ifeq ($(OS_TARGET),WIN95)
NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
endif
+ifdef MACOS_SDK_DIR
+NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR)
+endif
ifdef USE_DEBUG_RTL
NSPR_CONFIGURE_OPTS += --enable-debug-rtl
endif