Mon Mar 9 00:03:00 2020 UTC ()
Build RUMP with -fno-delete-null-pointer-checks on all compilers

no-delete-null-pointer-checks is required in Clang/LLVM at least for
NULL + 0 operations that trigger LLVM UBSan and could be miscompiled.


(kamil)
diff -r1.125 -r1.126 src/sys/rump/Makefile.rump

cvs diff -r1.125 -r1.126 src/sys/rump/Makefile.rump (expand / switch to context diff)
--- src/sys/rump/Makefile.rump 2020/02/20 22:52:10 1.125
+++ src/sys/rump/Makefile.rump 2020/03/09 00:03:00 1.126
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.125 2020/02/20 22:52:10 joerg Exp $
+#	$NetBSD: Makefile.rump,v 1.126 2020/03/09 00:03:00 kamil Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -22,7 +22,9 @@
 # We are compiling the kernel code with no-delete-null-pointer-checks,
 # and compiling without it, causes issues at least on sh3 by adding
 # aborts after kern_assert on NULL pointer checks.
-CFLAGS+=    ${${ACTIVE_CC} == "gcc":? -fno-delete-null-pointer-checks :}
+# no-delete-null-pointer-checks is required in Clang/LLVM at least for
+# NULL + 0 operations that trigger LLVM UBSan and could be miscompiled.
+CFLAGS+=    -fno-delete-null-pointer-checks
 
 # Define baseline cpu for mips ports, required for
 # rumpcomp_sync_icache() hypercall.