mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Arnaud Lacombe <lacombar@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>, Michal Marek <mmarek@suse.cz>,
	torvalds@linux-foundation.org, x86@kernel.org,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH -v3] kbuild: Add extra gcc checks
Date: Mon, 21 Feb 2011 05:37:14 +0100	[thread overview]
Message-ID: <20110221043714.GA31194@liondog.tnic> (raw)
In-Reply-To: <AANLkTimZhB8Ong=nJ_mjit+VRtb7g+TQhT9_wvojQ0-e@mail.gmail.com>

On Sun, Feb 20, 2011 at 10:26:13PM -0500, Arnaud Lacombe wrote:

> > The idea behind this option is targeted at developers who, in the
> > process of writing their code, want to do the occasional
> >
> > make W=1 [target.o]
> >
> > and let gcc do more extensive code checking for them. Then, they
> > could eyeball the output for valid gcc warnings about various
> > bugs/discrepancies which are not reported during the normal build
> > process.
> >

[..]

> > +ifeq ("$(origin W)", "command line")
> > +  KBUILD_ENABLE_EXTRA_GCC_CHECKS = 1
> > +  export KBUILD_ENABLE_EXTRA_GCC_CHECKS
> > +endif
> > +
> You never check CC is gcc. How can you assert this ?

Hmm, I somehow knew that the other compilers are going to come into the
discussion :).

> Moreover, can you certify that all the compiler supported to build
> Linux do support the set of new warnings ?

Well, as you've probably already read in the commit message, this
option is for devs only, in case they want to do a build-check whether
the couple of lines they just added to a .c file trigger new compiler
warnings. So, no, I cannot certify this and I don't have to - this is
not meant for production use anyway.

> What about icc ?

I don't know, is anyone using it to build the kernel? Even if so, icc
might have a completely different set of -W options (totally guessing
here) so you shouldn't use 'make W=1' with it.

> old gcc?

Yes, cc-option should be used in that case, I'll redo the patch.

> LLVM/clang ?

Can you even build the kernel with it?

But to make sure we're on the realistic side of things. First of all,
the purpose of this is to quickly get gcc scream out while building your
changes. Secondly, let's face it, the majority of developers, if not
all, use gcc, the kernel code is full of gcc-isms so accomodating all
the compilers to such a quick-and-dirty test option is just plain too
much. Look at it this way: it is cheaper to upgrade your dev environment
than add unnecessary and ugly code to kbuild. Even the argument with
older gcc versions cannot weigh in enough in favor of the cc-option -
simply upgrade your gcc.

Thanks.

-- 
Regards/Gruss,
    Boris.

  reply	other threads:[~2011-02-21  4:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-20 16:35 [PATCH] " Borislav Petkov
2011-02-20 17:11 ` Ingo Molnar
2011-02-20 17:57 ` Sam Ravnborg
2011-02-20 19:39   ` Borislav Petkov
2011-02-20 19:52     ` Sam Ravnborg
2011-02-21  2:23       ` [PATCH -v3] " Borislav Petkov
2011-02-21  3:26         ` Arnaud Lacombe
2011-02-21  4:37           ` Borislav Petkov [this message]
2011-02-21  5:22             ` Arnaud Lacombe
2011-02-20 20:00     ` [PATCH] " Joe Perches
2011-02-21  2:27       ` Borislav Petkov
2011-02-21  3:34         ` Arnaud Lacombe
2011-02-21  4:54           ` Borislav Petkov
2011-02-21  5:32             ` Arnaud Lacombe
2011-02-20 20:20 ` Jesper Juhl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110221043714.GA31194@liondog.tnic \
    --to=bp@alien8.de \
    --cc=lacombar@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mmarek@suse.cz \
    --cc=sam@ravnborg.org \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®