From f5e0d33ab46086c88ce800bb80be547c046a0efa Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Thu, 30 Jun 2022 21:15:25 +1200 Subject: Allow libsanitizer on architectures that support it libsanitizer is only supported on selected architectures. Add ARCH_SUPPORTS_LIBSANITIZER and have architectures select this option based on the list of supported configurations from GCC's libsanitizer/configure.tgt. Support for mips64 was added in GCC12 so this is an additional condition for the mips architecture. Fixes #1733 Signed-off-by: Chris Packham --- config/cc/gcc.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'config/cc') diff --git a/config/cc/gcc.in b/config/cc/gcc.in index ea7103b8..b77efba8 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -258,17 +258,24 @@ config CC_GCC_LIBQUADMATH The default is 'N'. Say 'Y' if you need it, and report success/failure. config CC_GCC_LIBSANITIZER - bool + tristate prompt "Compile libsanitizer" depends on THREADS_NATIVE depends on !LIBC_UCLIBC_NG && !LIBC_MUSL # Currently lacks required headers (like netrom.h) + depends on ARCH_SUPPORTS_LIBSANITIZER help libsanitizer is a library which provides run-time sanitising of either or both of: - memory access patterns (out-of-bonds, use-after-free) - racy data accesses (in multi-threaded programs) - The default is 'N'. Say 'Y' if you need it, and report success/failure. + Option | libsanitizer | Associated ./configure switch + ---------+--------------------+-------------------------------- + Y | forcibly used | --enable-libsanitizer + M | auto | (none, ./configure decides) + N | forcibly not used | --disable-libsanitizer + + The default is 'N'. Say 'Y' or 'M' if you need it, and report success/failure. config CC_GCC_LIBMPX bool -- cgit v1.2.3