summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-03-23 22:57:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-03-23 23:37:22 +0100
commit91658b402b66b67c785687d5b3a76e3183fe76bf (patch)
tree32815a89dac0974e0a9ee1212e7ab1cbf78373c8
parent77a8b485085ecda67e4e0cd76298296dad4e4467 (diff)
external/nss: --no-zdefs for gyp-base sanitizer builds
Change-Id: I0516295c340e4b6df2fae852303e423a08784172 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90943 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--external/nss/ExternalProject_nss.mk1
-rw-r--r--external/nss/UnpackedTarball_nss.mk8
-rw-r--r--external/nss/asan.patch.112
3 files changed, 1 insertions, 20 deletions
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index 1ddcc1fc70e8..404331512c90 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -75,6 +75,7 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecuta
NINJA=$(NINJA) \
./build.sh -v --disable-tests --enable-libpkix \
$(if $(ENABLE_DBGUTIL),,--opt) \
+ $(if $(COM_IS_CLANG),$(if $(filter -fsanitize=%,$(CC)),--no-zdefs)) \
&& rm -f $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/*.a \
,nss)
$(call gb_Trace_EndRange,nss,EXTERNAL)
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index 2cffb09212d7..8bfc2557bece 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -44,12 +44,4 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
))
endif
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
-$(eval $(call gb_UnpackedTarball_add_patches,nss,\
- external/nss/asan.patch.1 \
-))
-endif
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/external/nss/asan.patch.1 b/external/nss/asan.patch.1
deleted file mode 100644
index 7dfd6ed4e782..000000000000
--- a/external/nss/asan.patch.1
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur nss.org/nss/coreconf/Linux.mk nss/nss/coreconf/Linux.mk
---- nss.org/nss/coreconf/Linux.mk 2014-05-06 04:36:01.817838877 +0200
-+++ nss/nss/coreconf/Linux.mk 2014-05-06 04:37:25.387835456 +0200
-@@ -146,7 +146,7 @@
- # we don't use -z defs there.
- # Also, -z defs conflicts with Address Sanitizer, which emits relocations
- # against the libsanitizer runtime built into the main executable.
--ZDEFS_FLAG = -Wl,-z,defs
-+ZDEFS_FLAG =
- 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')
- LDFLAGS += $(ARCHFLAG) -z noexecstack
-