Source-Changes-HG archive

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

[src/trunk]: src/share/mk Build and install GCC TSan for 64-bit CPUs



details:   https://anonhg.NetBSD.org/src/rev/67ae6211d3a2
branches:  trunk
changeset: 943899:67ae6211d3a2
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sun Sep 13 02:37:31 2020 +0000

description:
Build and install GCC TSan for 64-bit CPUs

diffstat:

 distrib/sets/lists/base/shl.mi                       |  5 ++++-
 distrib/sets/lists/comp/mi                           |  6 +++++-
 distrib/sets/lists/comp/shl.mi                       |  3 ++-
 distrib/sets/lists/debug/mi                          |  3 ++-
 distrib/sets/lists/debug/shl.mi                      |  3 ++-
 external/gpl3/gcc/lib/Makefile                       |  7 ++++++-
 external/gpl3/gcc/lib/libtsan/Makefile               |  3 ++-
 external/gpl3/gcc/usr.bin/include/sanitizer/Makefile |  4 +++-
 share/mk/bsd.own.mk                                  |  8 ++++----
 9 files changed, 30 insertions(+), 12 deletions(-)

diffs (171 lines):

diff -r 9ed0bc249d36 -r 67ae6211d3a2 distrib/sets/lists/base/shl.mi
--- a/distrib/sets/lists/base/shl.mi    Sat Sep 12 23:12:44 2020 +0000
+++ b/distrib/sets/lists/base/shl.mi    Sun Sep 13 02:37:31 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.901 2020/09/08 13:01:47 adam Exp $
+# $NetBSD: shl.mi,v 1.902 2020/09/13 02:37:31 kamil Exp $
 #
 # Note:        Don't delete entries from here - mark them as "obsolete" instead,
 #      unless otherwise stated below.
@@ -896,6 +896,9 @@
 ./usr/lib/libtre.so                            base-sys-shlib          compatfile
 ./usr/lib/libtre.so.0                          base-sys-shlib          compatfile
 ./usr/lib/libtre.so.0.8                                base-sys-shlib          compatfile
+./usr/lib/libtsan.so                           base-sys-shlib          arch64,cxx,gcc
+./usr/lib/libtsan.so.1                         base-sys-shlib          arch64,cxx,gcc=9
+./usr/lib/libtsan.so.1.0                       base-sys-shlib          arch64,cxx,gcc=9
 ./usr/lib/libtspi.so                           base-sys-shlib          compatfile,tpm
 ./usr/lib/libtspi.so.3                         base-sys-shlib          compatfile,tpm
 ./usr/lib/libtspi.so.3.0                       base-sys-shlib          compatfile,tpm
diff -r 9ed0bc249d36 -r 67ae6211d3a2 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Sat Sep 12 23:12:44 2020 +0000
+++ b/distrib/sets/lists/comp/mi        Sun Sep 13 02:37:31 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.2351 2020/09/12 12:11:19 roy Exp $
+#      $NetBSD: mi,v 1.2352 2020/09/13 02:37:31 kamil Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.comp                           comp-sys-root
@@ -2174,6 +2174,8 @@
 ./usr/include/gcc-9/sanitizer/asan_interface.h         comp-gcc-include        gcc=9
 ./usr/include/gcc-9/sanitizer/common_interface_defs.h  comp-gcc-include        gcc=9
 ./usr/include/gcc-9/sanitizer/lsan_interface.h         comp-gcc-include        gcc=9
+./usr/include/gcc-9/sanitizer/netbsd_syscall_hooks.h   comp-gcc-include        gcc=9
+./usr/include/gcc-9/sanitizer/tsan_interface.h         comp-gcc-include        gcc=9
 ./usr/include/gcc-9/sanitizer/tsan_interface_atomic.h  comp-gcc-include        gcc=9
 ./usr/include/gcc-9/stdatomic.h                                comp-gcc-include        gcc=9
 ./usr/include/gelf.h                           comp-c-include
@@ -3945,6 +3947,8 @@
 ./usr/lib/libtpm_unseal_p.a                    comp-c-proflib          compatfile,tpm,profile
 ./usr/lib/libtre.a                             comp-c-lib              compatfile
 ./usr/lib/libtre_p.a                           comp-c-proflib          compatfile,profile
+./usr/lib/libtsan.a                            comp-c-lib              arch64,cxx,gcc
+./usr/lib/libtsan_p.a                          comp-c-proflib          arch64,profile,cxx,gcc
 ./usr/lib/libtspi.a                            comp-c-lib              compatfile,tpm
 ./usr/lib/libtspi_p.a                          comp-c-proflib          compatfile,tpm,profile
 ./usr/lib/libubsan.a                           comp-c-lib              compatfile,cxx,gcc
diff -r 9ed0bc249d36 -r 67ae6211d3a2 distrib/sets/lists/comp/shl.mi
--- a/distrib/sets/lists/comp/shl.mi    Sat Sep 12 23:12:44 2020 +0000
+++ b/distrib/sets/lists/comp/shl.mi    Sun Sep 13 02:37:31 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.339 2020/08/27 15:32:00 riastradh Exp $
+# $NetBSD: shl.mi,v 1.340 2020/09/13 02:37:31 kamil Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -274,6 +274,7 @@
 ./usr/lib/libtermlib_pic.a                     comp-c-piclib           compatfile,picinstall
 ./usr/lib/libtpm_unseal_pic.a                  comp-tpm-lib            compatfile,picinstall,tpm
 ./usr/lib/libtre_pic.a                         comp-c-piclib           compatfile,picinstall
+./usr/lib/libtsan_pic.a                                comp-c-piclib           arch64,picinstall,cxx,gcc
 ./usr/lib/libtspi_pic.a                                comp-c-piclib           compatfile,picinstall,tpm
 ./usr/lib/libubsan_pic.a                       comp-c-piclib           compatfile,picinstall,cxx,gcc
 ./usr/lib/libukfs_pic.a                                comp-c-piclib           compatfile,picinstall,rump
diff -r 9ed0bc249d36 -r 67ae6211d3a2 distrib/sets/lists/debug/mi
--- a/distrib/sets/lists/debug/mi       Sat Sep 12 23:12:44 2020 +0000
+++ b/distrib/sets/lists/debug/mi       Sun Sep 13 02:37:31 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.333 2020/09/12 15:25:42 jmcneill Exp $
+# $NetBSD: mi,v 1.334 2020/09/13 02:37:31 kamil Exp $
 ./etc/mtree/set.debug                           comp-sys-root
 ./usr/lib                                      comp-sys-usr            compatdir
 ./usr/lib/i18n/libBIG5_g.a                     comp-c-debuglib         debuglib,compatfile
@@ -261,6 +261,7 @@
 ./usr/lib/libterminfo_g.a                      comp-c-debuglib         debuglib,compatfile
 ./usr/lib/libtpm_unseal_g.a                    comp-c-debuglib         debuglib,compatfile,tpm
 ./usr/lib/libtre_g.a                           comp-c-debuglib         debuglib,compatfile
+./usr/lib/libtsan_g.a                          comp-c-debuglib         debuglib,arch64,cxx,gcc
 ./usr/lib/libtspi_g.a                          comp-c-debuglib         debuglib,compatfile,tpm
 ./usr/lib/libubsan_g.a                         comp-c-debuglib         debuglib,compatfile,cxx,gcc
 ./usr/lib/libukfs_g.a                          comp-c-debuglib         debuglib,compatfile,rump
diff -r 9ed0bc249d36 -r 67ae6211d3a2 distrib/sets/lists/debug/shl.mi
--- a/distrib/sets/lists/debug/shl.mi   Sat Sep 12 23:12:44 2020 +0000
+++ b/distrib/sets/lists/debug/shl.mi   Sun Sep 13 02:37:31 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.261 2020/09/06 10:54:26 mrg Exp $
+# $NetBSD: shl.mi,v 1.262 2020/09/13 02:37:31 kamil Exp $
 ./usr/lib/libbfd_g.a                                           comp-c-debuglib debuglib,compatfile,binutils
 ./usr/libdata/debug/lib                                                base-sys-usr    debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libavl.so.0.0.debug                    comp-zfs-debug  debug,dynamicroot,zfs
@@ -316,6 +316,7 @@
 ./usr/libdata/debug/usr/lib/libterminfo.so.2.0.debug           comp-sys-debug  debug,compatfile
 ./usr/libdata/debug/usr/lib/libtpm_unseal.so.1.0.debug         comp-tpm-debug  debug,compatfile,tpm
 ./usr/libdata/debug/usr/lib/libtre.so.0.8.debug                        comp-sys-debug  debug,compatfile
+./usr/libdata/debug/usr/lib/libtsan.so.1.0.debug               comp-sys-debug  debug,arch64,cxx,gcc=9
 ./usr/libdata/debug/usr/lib/libtspi.so.3.0.debug               comp-tpm-debug  debug,compatfile,tpm
 ./usr/libdata/debug/usr/lib/libubsan.so.1.0.debug              comp-sys-debug  obsolete,gcc=5
 ./usr/libdata/debug/usr/lib/libubsan.so.2.0.debug              comp-sys-debug  debug,compatfile,obsolete
diff -r 9ed0bc249d36 -r 67ae6211d3a2 external/gpl3/gcc/lib/Makefile
--- a/external/gpl3/gcc/lib/Makefile    Sat Sep 12 23:12:44 2020 +0000
+++ b/external/gpl3/gcc/lib/Makefile    Sun Sep 13 02:37:31 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.18 2019/08/23 08:17:26 mrg Exp $
+#      $NetBSD: Makefile,v 1.19 2020/09/13 02:37:32 kamil Exp $
 
 .include <bsd.own.mk>
 
@@ -12,6 +12,11 @@
 SUBDIR+= libsupc++ libstdc++-v3
 
 SUBDIR+= .WAIT libasan liblsan libubsan
+
+# TSan does not work with 32bit address space
+.if (!empty(MACHINE_ARCH:M*64*) || ${MACHINE_ARCH} == alpha)
+SUBDIR+= libtsan
+.endif
 .endif
 
 .include <bsd.subdir.mk>
diff -r 9ed0bc249d36 -r 67ae6211d3a2 external/gpl3/gcc/lib/libtsan/Makefile
--- a/external/gpl3/gcc/lib/libtsan/Makefile    Sat Sep 12 23:12:44 2020 +0000
+++ b/external/gpl3/gcc/lib/libtsan/Makefile    Sun Sep 13 02:37:31 2020 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.12 2020/09/12 23:04:44 kamil Exp $
+# $NetBSD: Makefile,v 1.13 2020/09/13 02:37:32 kamil Exp $
 
 UNSUPPORTED_COMPILER.clang=     # defined
 NOSANITIZER=    # defined
+NOCOMPAT=      # defined
 
 .include <bsd.own.mk>
 
diff -r 9ed0bc249d36 -r 67ae6211d3a2 external/gpl3/gcc/usr.bin/include/sanitizer/Makefile
--- a/external/gpl3/gcc/usr.bin/include/sanitizer/Makefile      Sat Sep 12 23:12:44 2020 +0000
+++ b/external/gpl3/gcc/usr.bin/include/sanitizer/Makefile      Sun Sep 13 02:37:31 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.4 2019/08/15 16:01:27 kamil Exp $
+#      $NetBSD: Makefile,v 1.5 2020/09/13 02:37:32 kamil Exp $
 
 .include "../../../Makefile.gcc_path"
 
@@ -15,6 +15,8 @@
 #INCS+=        dfsan_interface.h # not supported
 INCS+= lsan_interface.h
 #INCS+=        msan_interface.h # not ready in GCC
+INCS+= netbsd_syscall_hooks.h
+INCS+= tsan_interface.h
 INCS+= tsan_interface_atomic.h
 
 .include <bsd.own.mk>
diff -r 9ed0bc249d36 -r 67ae6211d3a2 share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk       Sat Sep 12 23:12:44 2020 +0000
+++ b/share/mk/bsd.own.mk       Sun Sep 13 02:37:31 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.own.mk,v 1.1210 2020/09/12 15:25:42 jmcneill Exp $
+#      $NetBSD: bsd.own.mk,v 1.1211 2020/09/13 02:37:32 kamil Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1000,9 +1000,9 @@
 # including bsd.own.mk.
 #
 .for var in \
-       NOCRYPTO NODOC NOHTML NOINFO NOLIBCSANITIZER NOLINKLIB NOLINT NOMAN \
-       NONLS NOOBJ NOPIC NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB \
-       NODEBUGLIB NOSANITIZER NORELRO
+       NOCOMPAT NOCRYPTO NODOC NOHTML NOINFO NOLIBCSANITIZER NOLINKLIB \
+       NOLINT NOMAN NONLS NOOBJ NOPIC NOPICINSTALL NOPROFILE NOSHARE \
+       NOSTATICLIB NODEBUGLIB NOSANITIZER NORELRO
 .if defined(${var})
 MK${var:S/^NO//}:=     no
 .endif



Home | Main Index | Thread Index | Old Index