Re: [PATCH] torture: Pass --kmake-arg to all make invocations

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

 



On Tue, Jun 16 2020 at 09:05AM -0700, Paul E. McKenney wrote:

> On Tue, Jun 16, 2020 at 11:49:24AM +0200, Marco Elver wrote:
> > We need to pass the arguments provided to --kmake-arg to all make
> > invocations. In particular, the make invocations generating the configs
> > need to see the final make arguments, e.g. if config variables depend on
> > particular variables that are passed to make.
> > 
> > For example, when using '--kcsan --kmake-arg CC=clang-11', we would lose
> > CONFIG_KCSAN=y due to 'make oldconfig' not seeing that we want to use a
> > compiler that supports KCSAN.
> > 
> > Signed-off-by: Marco Elver <elver@xxxxxxxxxx>
> 
> Queued and pushed, thank you!
> 
> Would the following patch make sense, at least until such time
> as some other compiler supports KCSAN?
> 
> 							Thanx, Paul
> 
> ------------------------------------------------------------------------
> 
> commit 88bcaa730b6d40ddf69b09ed6f0a14803d087d99
> Author: Paul E. McKenney <paulmck@xxxxxxxxxx>
> Date:   Tue Jun 16 09:02:34 2020 -0700
> 
>     torture: Make --kcsan default to using Clang 11
>     
>     Currently, Clang 11 is the only compiler that can support KCSAN.
>     Therefore, as a convenience to the KCSAN user, this commit causes
>     --kcsan to specify Clang 11 unless a "CC=" argument was already
>     specified via the --kmake-arg argument.

As soon as more compilers support KCSAN (e.g. clang-12, etc...) we run
the risk of actually inconveniencing ourselves more because then we
really need to say '--kmake-arg CC=clang-1X' to not use the old
compiler. Or revert this in time.

My command-line looks more like this right now:

	kvm.sh ... --kmake-arg "CC="${HOME}/local/<gcc-or-clang>-11.kcsan/local/bin/<gcc-or-clang>" ...

I think the safer alternative would be to error if CONFIG_KCSAN=y is not
in the config, and simply suggest "Did you forget to switch your
compiler with '--kmake-arg CC=<cc-that-supports-kcsan>'?" (of course, a
'gcc' in $PATH that supports KCSAN would also be fine -- see below).
Eventually, when the default compilers support KCSAN, this will resolve
itself gracefully.

Also, I'm going to send a series later this week to re-enable GCC
support. ;-)

Thanks,
-- Marco



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux