[PATCH] xen: Drop CONFIG_CC_HAS_UBSAN

Andrew Cooper posted 1 patch 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20250422113509.1286581-1-andrew.cooper3@citrix.com
xen/Kconfig       | 4 ----
xen/Kconfig.debug | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
[PATCH] xen: Drop CONFIG_CC_HAS_UBSAN
Posted by Andrew Cooper 8 months ago
All supported toolchains now have it.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Anthony PERARD <anthony.perard@vates.tech>
CC: Michal Orzel <michal.orzel@amd.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Julien Grall <julien@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/Kconfig       | 4 ----
 xen/Kconfig.debug | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/xen/Kconfig b/xen/Kconfig
index 2128f0ccfc0b..72fdb8376087 100644
--- a/xen/Kconfig
+++ b/xen/Kconfig
@@ -37,10 +37,6 @@ config CC_HAS_VISIBILITY_ATTRIBUTE
 config CC_SPLIT_SECTIONS
 	bool
 
-# Compiler supports -fsanitize=undefined
-config CC_HAS_UBSAN
-	def_bool $(cc-option,-fsanitize=undefined)
-
 # Set code alignment.
 #
 # Allow setting on a boolean basis, and then convert such selection to an
diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
index f7cc5ffaabd7..c4a8d86912e0 100644
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -98,7 +98,7 @@ config SCRUB_DEBUG
 
 config UBSAN
 	bool "Undefined behaviour sanitizer"
-	depends on HAS_UBSAN && CC_HAS_UBSAN
+	depends on HAS_UBSAN
 	help
 	  Enable undefined behaviour sanitizer. It uses compiler to insert code
 	  snippets so that undefined behaviours in C are detected during runtime.
-- 
2.39.5


Re: [PATCH] xen: Drop CONFIG_CC_HAS_UBSAN
Posted by Jan Beulich 8 months ago
On 22.04.2025 13:35, Andrew Cooper wrote:
> All supported toolchains now have it.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>