[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [XEN PATCH v2 2/6] xen: Have Kconfig check $(CC)'s version



On 17.12.2019 11:58, Anthony PERARD wrote:
> --- a/xen/Kconfig
> +++ b/xen/Kconfig
> @@ -4,9 +4,26 @@
>  #
>  mainmenu "Xen/$(SRCARCH) $(XEN_FULLVERSION) Configuration"
>  
> +source "scripts/Kconfig.include"
> +
>  config BROKEN
>       bool
>  
> +config CC_IS_GCC
> +     def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc)
> +
> +config GCC_VERSION
> +     int
> +     default $(shell,$(BASEDIR)/scripts/gcc-version.sh $(CC)) if CC_IS_GCC
> +     default 0

Why "if" and a 2nd "default" line here but ...

> +config CC_IS_CLANG
> +     def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)
> +
> +config CLANG_VERSION
> +     int
> +     default $(shell,$(BASEDIR)/scripts/clang-version.sh $(CC))

... just a single, unconditional one here? Wouldn't both better
have a "depends on CC_IS_*" line instead? This would then also
result (afaict) in no CONFIG_CLANG_VERSION in .config if building
with gcc (and vice versa), instead of a bogus CONFIG_CLANG_VERSION=0.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.