[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 08.01.2020 15:47, Anthony PERARD wrote: > On Mon, Jan 06, 2020 at 03:34:43PM +0100, Jan Beulich wrote: >> On 06.01.2020 15:01, Anthony PERARD wrote: >>> On Fri, Jan 03, 2020 at 05:42:18PM +0100, Jan Beulich wrote: >>>> 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. >>> >>> It sounds attracting to remove variables from .config, but it is equally >>> attracting to always have a variable set. It can be used >>> unconditionally when always set (without risking invalid syntax for >>> example). >> >> Hmm, yes, as long as we don't have (by mechanical conversion) or gain >> constructs like >> >> #if CONFIG_GCC_VERSION < 50000 /* must be gcc 4.x */ >> >> Plus - what's CONFIG_CC_IS_{GCC,CLANG} good for then? The same can >> then be achieved by comparing CONFIG_{GCC,CLANG}_VERSION against zero. > > Sure, but it is much easier to understand what "ifdef CONFIG_CC_IS_GCC" > is actually checking than it is to understand what > "[ $CONFIG_GCC_VERSION -ne 0 ]" is for. In the second form, it isn't > immediatly obvious for humans that we are simply checking which compiler > is in use. And I wasn't really suggesting to drop the CC_IS_* ones. What I dislike is the duplication resulting from the *_VERSION ones not having a "depends on CC_IS_*". Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |