libsanitizer: Enable LSan and TSan for riscv64

Message ID mvmil4bj0t1.fsf@suse.de
State Accepted
Headers
Series libsanitizer: Enable LSan and TSan for riscv64 |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Andreas Schwab Jan. 2, 2024, 1:56 p.m. UTC
  All new (tsan) tests are working as expected.

	* configure.tgt (riscv64-*-linux*): Enable LSan and TSan.
---
 libsanitizer/configure.tgt | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Jeff Law Jan. 2, 2024, 4:28 p.m. UTC | #1
On 1/2/24 06:56, Andreas Schwab wrote:
> All new (tsan) tests are working as expected.
> 
> 	* configure.tgt (riscv64-*-linux*): Enable LSan and TSan.
OK
Jeff
  

Patch

diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt
index d24566a2343..38fc7001ff7 100644
--- a/libsanitizer/configure.tgt
+++ b/libsanitizer/configure.tgt
@@ -72,6 +72,11 @@  case "${target}" in
   x86_64-*-solaris2.11* | i?86-*-solaris2.11*)
 	;;
   riscv64-*-linux*)
+	if test x$ac_cv_sizeof_void_p = x8; then
+		TSAN_SUPPORTED=yes
+		LSAN_SUPPORTED=yes
+		TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_riscv64.lo
+	fi
 	;;
   loongarch64-*-linux*)
 	;;