Module Name:    src
Committed By:   kamil
Date:           Wed Jun  6 12:02:43 UTC 2018

Modified Files:
        src/external/bsd/libc++/lib: Makefile

Log Message:
Don't pass -z defs to libc++ with MKSANITIZER=yes

Sanitizers are conflicting with this option:

  When linking shared libraries, the AddressSanitizer run-time is not
  linked, so -Wl,-z,defs may cause link errors (t use it with
  AddressSanitizer).

https://clang.llvm.org/docs/AddressSanitizer.html

  When linking shared libraries, the MemorySanitizer run-time is not
  linked, so -Wl,-z,defs may cause link errors (t use it with
  MemorySanitizer).

https://clang.llvm.org/docs/MemorySanitizer.html

Solution suggested by <christos>
Root cause of breaking libc++ investigated by <Yang Zheng>


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/libc++/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libc++/lib/Makefile
diff -u src/external/bsd/libc++/lib/Makefile:1.10 src/external/bsd/libc++/lib/Makefile:1.11
--- src/external/bsd/libc++/lib/Makefile:1.10	Wed Jan 11 12:10:26 2017
+++ src/external/bsd/libc++/lib/Makefile	Wed Jun  6 12:02:43 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2017/01/11 12:10:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.11 2018/06/06 12:02:43 kamil Exp $
 
 LIB=		c++
 WARNS=		4
@@ -44,6 +44,8 @@ CWARNFLAGS.clang+=	-Wno-error=missing-pr
 CWARNFLAGS.clang+=	-Wno-error=missing-field-initializers -Wno-error=switch
 CWARNFLAGS.clang+=	-Wno-error=implicit-exception-spec-mismatch
 
+.if ${MKSANITIZER} != "yes"
 LDFLAGS+=	-Wl,-z,defs
+.endif
 
 .include <bsd.lib.mk>

Reply via email to