diff mbox series

[2/3] Xen: Update compiler checks

Message ID 20250320155908.43885-3-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series Xen: CI changes for new toolchain baseline | expand

Commit Message

Andrew Cooper March 20, 2025, 3:59 p.m. UTC
We didn't really have a Clang check before, so add one while adjusting the GCC
check.

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>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/include/xen/compiler.h | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

Comments

Stefano Stabellini March 21, 2025, 10:10 p.m. UTC | #1
On Thu, 20 Mar 2025, Andrew Cooper wrote:
> We didn't really have a Clang check before, so add one while adjusting the GCC
> check.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

> ---
> 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>
> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> ---
>  xen/include/xen/compiler.h | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
> index b118e4ba62eb..cc955be32664 100644
> --- a/xen/include/xen/compiler.h
> +++ b/xen/include/xen/compiler.h
> @@ -1,18 +1,10 @@
>  #ifndef __LINUX_COMPILER_H
>  #define __LINUX_COMPILER_H
>  
> -#if !defined(__GNUC__) || (__GNUC__ < 4)
> -#error Sorry, your compiler is too old/not recognized.
> -#elif CONFIG_CC_IS_GCC
> -# if defined(CONFIG_ARM_32) && CONFIG_GCC_VERSION < 40900
> -#  error Sorry, your version of GCC is too old - please use 4.9 or newer.
> -# elif defined(CONFIG_ARM_64) && CONFIG_GCC_VERSION < 50100
> -/*
> - * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293
> - * https://lore.kernel.org/r/20210107111841.GN1551@shell.armlinux.org.uk
> - */
> -#  error Sorry, your version of GCC is too old - please use 5.1 or newer.
> -# endif
> +#if CONFIG_CC_IS_GCC && CONFIG_GCC_VERSION < 50100
> +# error Sorry, your version of GCC is too old - please use 5.1 or newer
> +#elif CONFIG_CC_IS_CLANG && CONFIG_CLANG_VERSION < 110000
> +# error Sorry, your version of Clang is too old - please use 11 or newer
>  #endif
>  
>  #define barrier()     __asm__ __volatile__("": : :"memory")
> -- 
> 2.39.5
>
diff mbox series

Patch

diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
index b118e4ba62eb..cc955be32664 100644
--- a/xen/include/xen/compiler.h
+++ b/xen/include/xen/compiler.h
@@ -1,18 +1,10 @@ 
 #ifndef __LINUX_COMPILER_H
 #define __LINUX_COMPILER_H
 
-#if !defined(__GNUC__) || (__GNUC__ < 4)
-#error Sorry, your compiler is too old/not recognized.
-#elif CONFIG_CC_IS_GCC
-# if defined(CONFIG_ARM_32) && CONFIG_GCC_VERSION < 40900
-#  error Sorry, your version of GCC is too old - please use 4.9 or newer.
-# elif defined(CONFIG_ARM_64) && CONFIG_GCC_VERSION < 50100
-/*
- * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293
- * https://lore.kernel.org/r/20210107111841.GN1551@shell.armlinux.org.uk
- */
-#  error Sorry, your version of GCC is too old - please use 5.1 or newer.
-# endif
+#if CONFIG_CC_IS_GCC && CONFIG_GCC_VERSION < 50100
+# error Sorry, your version of GCC is too old - please use 5.1 or newer
+#elif CONFIG_CC_IS_CLANG && CONFIG_CLANG_VERSION < 110000
+# error Sorry, your version of Clang is too old - please use 11 or newer
 #endif
 
 #define barrier()     __asm__ __volatile__("": : :"memory")