[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXRb2K+WSfFGK=SASTU=+fUZ3XRQQ-+5xoDS=04HG92OQ@mail.gmail.com>
Date: Fri, 23 Aug 2013 14:18:02 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Sergei Trofimovich <slyfox@...too.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Michal Marek <mmarek@...e.cz>,
linux-kbuild <linux-kbuild@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2] Makefile: enable -Werror=implicit-int and
-Werror=strict-prototypes by default
On Thu, Aug 15, 2013 at 8:37 PM, Sergei Trofimovich <slyfox@...too.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"
See also commit a1f42beb8e287482d1a802731d4fb7e2bdc2c703
("Makefile: fix up CROSS_COMPILE and READABLE_ASM interaction.").
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists