public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyfox@gentoo.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Michal Marek <mmarek@suse.cz>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] Makefile: enable -Werror=implicit-int and -Werror=strict-prototypes by default
Date: Fri, 23 Aug 2013 20:37:49 +0300	[thread overview]
Message-ID: <20130823203749.687460c2@sf> (raw)
In-Reply-To: <CAMuHMdXRb2K+WSfFGK=SASTU=+fUZ3XRQQ-+5xoDS=04HG92OQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1543 bytes --]

On Fri, 23 Aug 2013 14:18:02 +0200
Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> On Thu, Aug 15, 2013 at 8:37 PM, Sergei Trofimovich <slyfox@gentoo.org> wrote:
> > diff --git a/Makefile b/Makefile
> > index 6e48848..53f4776 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -374,6 +374,11 @@ KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
> >                    -Werror-implicit-function-declaration \
> >                    -Wno-format-security \
> >                    -fno-delete-null-pointer-checks
> > +
> > +# not universally available, but nice to have ones
> > +KBUILD_CFLAGS   +=  $(call cc-option,-Werror=implicit-int) \
> > +                   $(call cc-option,-Werror=strict-prototypes)
> > +
> 
> This should be _below_ the line
> 
>     include $(srctree)/arch/$(SRCARCH)/Makefile
> 
> , together with the other users of cc-option, else it detects the features of
> the host compiler instead of the cross-compiler when cross-compiling:
> 
> cc1: error: unrecognized command line option "-Werror=implicit-int"
> cc1: error: unrecognized command line option "-Werror=strict-prototypes"

Oh, it was not obvious.

Does it mean the code right before is buggy as well?

>    ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
>    KBUILD_CFLAGS<->+= -Os $(call cc-disable-warning,maybe-uninitialized,)
    ^^^
>    else
>    KBUILD_CFLAGS<->+= -O2
>    endif
    
    include $(srctree)/arch/$(SRCARCH)/Makefile

Will respin fixed patch in a while.

Thanks!

-- 

  Sergei

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-08-23 17:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 18:37 [PATCH v2] Makefile: enable -Werror=implicit-int and -Werror=strict-prototypes by default Sergei Trofimovich
2013-08-15 21:18 ` Andrew Morton
2013-08-23 12:18 ` Geert Uytterhoeven
2013-08-23 17:37   ` Sergei Trofimovich [this message]
2013-08-23 17:55   ` [PATCH v3] " Sergei Trofimovich

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=20130823203749.687460c2@sf \
    --to=slyfox@gentoo.org \
    --cc=akpm@linux-foundation.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /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