|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1] compiler.h: define CONFIG_GCC_VERSION
On 18.06.2021 18:42, Olaf Hering wrote:
> --- a/xen/include/xen/compiler.h
> +++ b/xen/include/xen/compiler.h
> @@ -99,6 +99,13 @@
> __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
> (typeof(ptr)) (__ptr + (off)); })
>
> +#ifndef CONFIG_GCC_VERSION
> +# ifdef __GNUC__
> +# define CONFIG_GCC_VERSION (__GNUC__ * 10000 \
> + + __GNUC_MINOR__ * 100 \
> + + __GNUC_PATCHLEVEL__)
> +# endif
> +#endif
> #if CONFIG_GCC_VERSION >= 110000 /* See gcc bug 100680. */
> # define gcc11_wrap(x) RELOC_HIDE(x, 0)
> #else
Having thought about it, this feels like the wrong solution to
me: I'd rather not see us introduce further CONFIG_* which don't
really come from Kconfig. The more when we have an even simpler
alternative:
there's no CONFIG_GCC_VERSION
This was introduced in 4.14 only.
Reported-by: Olaf Hering <olaf@xxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/include/xen/compiler.h
+++ b/xen/include/xen/compiler.h
@@ -99,7 +99,7 @@
__asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
(typeof(ptr)) (__ptr + (off)); })
-#if CONFIG_GCC_VERSION >= 110000 /* See gcc bug 100680. */
+#if __GNUC__ >= 11 /* See gcc bug 100680. */
# define gcc11_wrap(x) RELOC_HIDE(x, 0)
#else
# define gcc11_wrap(x) (x)
I'll also adjust the original backport itself before putting it
on the 4.12 branch (where I think we want both this and the other
gcc 11 fixes).
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |