diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-05-13 02:12:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-15 13:16:30 +0000 |
commit | 3c5bc3128f8ade4e52069204df2da6c00ffb3806 (patch) | |
tree | cd0e7f6afcb2e8977ec18232c16555a75ccd3ed9 /external | |
parent | 08947735f9cc4b7bd69676c9dd4d1700e8e3b15b (diff) |
-fsanitize=address does not like -z defs
Change-Id: Id2a5c3009b46f9f91706b433411ca9f9c3cb7e39
Reviewed-on: https://gerrit.libreoffice.org/9334
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/nss/UnpackedTarball_nss.mk | 6 | ||||
-rw-r--r-- | external/nss/asan.patch.1 | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk index 17eb436d3282..9ac824188df6 100644 --- a/external/nss/UnpackedTarball_nss.mk +++ b/external/nss/UnpackedTarball_nss.mk @@ -23,4 +23,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\ external/nss/nss.mingw.patch.3) \ )) +ifeq ($(COM_GCC_IS_CLANG)$(filter -fsanitize=address,$(CC)),TRUE-fsanitize=address) +$(eval $(call gb_UnpackedTarball_add_patches,nss,\ + external/nss/asan.patch.1 \ +)) +endif + # vim: set noet sw=4 ts=4: diff --git a/external/nss/asan.patch.1 b/external/nss/asan.patch.1 new file mode 100644 index 000000000000..3b64aa6f3045 --- /dev/null +++ b/external/nss/asan.patch.1 @@ -0,0 +1,12 @@ +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 +@@ -145,7 +145,7 @@ + # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8) + # incorrectly reports undefined references in the libraries we link with, so + # we don't use -z defs there. +-ZDEFS_FLAG = -Wl,-z,defs ++ZDEFS_FLAG = + DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) -Wl,-z,origin '-Wl,-rpath,$$ORIGIN' + LDFLAGS += $(ARCHFLAG) + |