Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd Add LLVM sanitizers in the MKLLVM=yes build



details:   https://anonhg.NetBSD.org/src/rev/f3cb4a0fd3ec
branches:  trunk
changeset: 964723:f3cb4a0fd3ec
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed Aug 14 01:42:08 2019 +0000

description:
Add LLVM sanitizers in the MKLLVM=yes build

Enable in all the supported variations for NetBSD/amd64:

 - Address Sanitizer
 - Thread Sanitizer
 - Memory Sanitizer
 - Undefined Behavior Sanitizer
 - SafeStack
 - libFuzzer
 - XRay

This change enables the features on amd64 for start.

diffstat:

 distrib/sets/lists/base/md.amd64 |  48 +++++++++++++++++++++++++++++++++++++++-
 distrib/sets/lists/base/mi       |  10 +++++++-
 distrib/sets/lists/comp/mi       |  15 +++++++++++-
 etc/mtree/NetBSD.dist.base       |  10 +++++++-
 external/bsd/Makefile            |   5 +++-
 5 files changed, 83 insertions(+), 5 deletions(-)

diffs (157 lines):

diff -r 4dcb0c1976bf -r f3cb4a0fd3ec distrib/sets/lists/base/md.amd64
--- a/distrib/sets/lists/base/md.amd64  Wed Aug 14 00:51:48 2019 +0000
+++ b/distrib/sets/lists/base/md.amd64  Wed Aug 14 01:42:08 2019 +0000
@@ -1,10 +1,56 @@
-# $NetBSD: md.amd64,v 1.277 2018/11/11 12:03:08 maxv Exp $
+# $NetBSD: md.amd64,v 1.278 2019/08/14 01:42:08 kamil Exp $
 ./dev/lms0                                     base-obsolete           obsolete
 ./dev/mms0                                     base-obsolete           obsolete
 ./libexec/ld.elf_so-i386                       base-sys-shlib          compat,pic
 ./usr/bin/fdformat                             base-util-bin
 ./usr/bin/iasl                                 base-util-bin
 ./usr/bin/pmc                                  base-obsolete           obsolete
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-i386.a       comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-x86_64.a     comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-i386.so      comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-i386.so.0    comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-i386.so.0.0  comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-x86_64.so    comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-x86_64.so.0  comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-x86_64.so.0.0        comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-preinit-i386.a       comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-preinit-x86_64.a     comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan_cxx-i386.a   comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan_cxx-x86_64.a comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.dd-x86_64.a       comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.dyndd-x86_64.so   comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.dyndd-x86_64.so.0 comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.dyndd-x86_64.so.0.0       comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.fuzzer-x86_64.a   comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.fuzzer_no_main-x86_64.a   comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.msan-x86_64.a     comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.msan_cxx-x86_64.a comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.safestack-i386.a  comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.safestack-x86_64.a        comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.tsan-x86_64.a     comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.tsan_cxx-x86_64.a comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_minimal-i386.a      comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_minimal-x86_64.a    comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_minimal-i386.so     comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_minimal-i386.so.0   comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_minimal-i386.so.0.0 comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_minimal-x86_64.so   comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_minimal-x86_64.so.0 comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_minimal-x86_64.so.0.0       comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_standalone-i386.a   comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_standalone-x86_64.a comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_standalone-i386.so  comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_standalone-i386.so.0        comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_standalone-i386.so.0.0      comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_standalone-x86_64.so        comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_standalone-x86_64.so.0      comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_standalone-x86_64.so.0.0    comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_standalone_cxx-i386.a       comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.ubsan_standalone_cxx-x86_64.a     comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.xray-basic-x86_64.a       comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.xray-fdr-x86_64.a comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.xray-profiling-x86_64.a   comp-cxx-lib    llvm
+./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.xray-x86_64.a     comp-cxx-lib    llvm
 ./usr/lib/i386/libi386.so.2                    base-compat-shlib       compat,pic
 ./usr/lib/i386/libi386.so.2.0                  base-compat-shlib       compat,pic
 ./usr/lib/i386/libproc.so.1                    base-compat-shlib       compat,pic,dtrace
diff -r 4dcb0c1976bf -r f3cb4a0fd3ec distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi        Wed Aug 14 00:51:48 2019 +0000
+++ b/distrib/sets/lists/base/mi        Wed Aug 14 01:42:08 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1209 2019/07/24 06:53:42 wiz Exp $
+# $NetBSD: mi,v 1.1210 2019/08/14 01:42:08 kamil Exp $
 #
 # Note:        Don't delete entries from here - mark them as "obsolete" instead,
 #      unless otherwise stated below.
@@ -1265,6 +1265,14 @@
 ./usr/include/uvm                              base-c-usr
 ./usr/include/vm                               base-obsolete           obsolete
 ./usr/lib                                      base-sys-usr            compatdir
+./usr/lib/clang                                        base-sys-usr
+./usr/lib/clang/7.0.0                          base-sys-usr
+./usr/lib/clang/7.0.0/include                  base-sys-usr
+./usr/lib/clang/7.0.0/include/sanitizer                base-sys-usr
+./usr/lib/clang/7.0.0/include/xray             base-sys-usr
+./usr/lib/clang/7.0.0/lib                      base-sys-usr
+./usr/lib/clang/7.0.0/lib/netbsd               base-sys-usr
+./usr/lib/clang/7.0.0/share                    base-sys-usr
 ./usr/lib/dtrace                               base-sys-usr            dtrace
 ./usr/lib/dtrace/errno.d                       base-sys-usr            dtrace
 ./usr/lib/dtrace/psinfo.d                      base-sys-usr            dtrace
diff -r 4dcb0c1976bf -r f3cb4a0fd3ec distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Wed Aug 14 00:51:48 2019 +0000
+++ b/distrib/sets/lists/comp/mi        Wed Aug 14 01:42:08 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.2279 2019/08/10 20:35:35 mrg Exp $
+#      $NetBSD: mi,v 1.2280 2019/08/14 01:42:08 kamil Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.comp                           comp-sys-root
@@ -3297,6 +3297,19 @@
 ./usr/include/zconf.h                          comp-c-include
 ./usr/include/zlib.h                           comp-c-include
 ./usr/lib                                      base-sys-usr            compatdir
+./usr/lib/clang/7.0.0/include/sanitizer/allocator_interface.h  comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/include/sanitizer/asan_interface.h       comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/include/sanitizer/common_interface_defs.h        comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/include/sanitizer/coverage_interface.h   comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/include/sanitizer/msan_interface.h       comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/include/sanitizer/netbsd_syscall_hooks.h comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/include/sanitizer/tsan_interface.h       comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/include/sanitizer/tsan_interface_atomic.h        comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/include/xray/xray_interface.h    comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/include/xray/xray_log_interface.h        comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/include/xray/xray_records.h      comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/share/asan_blacklist.txt comp-cxx-include                llvm
+./usr/lib/clang/7.0.0/share/msan_blacklist.txt comp-cxx-include                llvm
 ./usr/lib/crt0.o                               comp-c-lib              compatfile
 ./usr/lib/gcrt0.o                              comp-c-lib              compatfile
 ./usr/lib/i18n/libBIG5.a                       comp-i18n-lib           compatfile
diff -r 4dcb0c1976bf -r f3cb4a0fd3ec etc/mtree/NetBSD.dist.base
--- a/etc/mtree/NetBSD.dist.base        Wed Aug 14 00:51:48 2019 +0000
+++ b/etc/mtree/NetBSD.dist.base        Wed Aug 14 01:42:08 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: NetBSD.dist.base,v 1.201 2019/08/02 19:58:00 nakayama Exp $
+#      $NetBSD: NetBSD.dist.base,v 1.202 2019/08/14 01:42:08 kamil Exp $
 #      @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -257,6 +257,14 @@
 ./usr/include/ufs/ufs
 ./usr/include/uvm
 ./usr/lib
+./usr/lib/clang
+./usr/lib/clang/7.0.0
+./usr/lib/clang/7.0.0/include
+./usr/lib/clang/7.0.0/include/sanitizer
+./usr/lib/clang/7.0.0/include/xray
+./usr/lib/clang/7.0.0/lib
+./usr/lib/clang/7.0.0/lib/netbsd
+./usr/lib/clang/7.0.0/share
 ./usr/lib/i18n
 ./usr/lib/lua
 ./usr/lib/lua/5.3
diff -r 4dcb0c1976bf -r f3cb4a0fd3ec external/bsd/Makefile
--- a/external/bsd/Makefile     Wed Aug 14 00:51:48 2019 +0000
+++ b/external/bsd/Makefile     Wed Aug 14 01:42:08 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.63 2019/04/03 15:21:58 joerg Exp $
+#      $NetBSD: Makefile,v 1.64 2019/08/14 01:42:08 kamil Exp $
 
 .include <bsd.own.mk>
 
@@ -30,6 +30,9 @@
 .if (${MKLLVM} != "no" || ${MKLLVMRT} != "no")
 SUBDIR+= llvm
 .endif
+.if (${MKLLVM} != "no")
+SUBDIR+= compiler_rt
+.endif
 .if (${MKNSD} != "no")
 SUBDIR+= nsd
 .endif



Home | Main Index | Thread Index | Old Index