mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kbuild: fix W=1 with gcc 4.3.2
@ 2011-04-21 21:08 Sam Ravnborg
  2011-04-21 21:13 ` Eric Dumazet
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2011-04-21 21:08 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild, lkml, Dave Jones

Building a kernel using W=1 with gcc 4.3.2 failed like this:

    cc1: error: unrecognized command line option "-Wpacked-bitfield-compat"

Make use of this option dependent on the compiler.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Dave Jones <davej@redhat.com>
---
I do not see this a stable material - people running stable kernels
have less value of W=1.

And the amount of warnings are outright silly. We should really
divide this up a bit so W=1 is semi usefull.

	Sam

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index d5f925a..b280284 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -73,7 +73,7 @@ KBUILD_EXTRA_WARNINGS += -Wnested-externs
 KBUILD_EXTRA_WARNINGS += -Wold-style-definition
 KBUILD_EXTRA_WARNINGS += $(call cc-option, -Woverlength-strings,)
 KBUILD_EXTRA_WARNINGS += -Wpacked
-KBUILD_EXTRA_WARNINGS += -Wpacked-bitfield-compat
+KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wpacked-bitfield-compat)
 KBUILD_EXTRA_WARNINGS += -Wpadded
 KBUILD_EXTRA_WARNINGS += -Wpointer-arith
 KBUILD_EXTRA_WARNINGS += -Wredundant-decls

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kbuild: fix W=1 with gcc 4.3.2
  2011-04-21 21:08 [PATCH] kbuild: fix W=1 with gcc 4.3.2 Sam Ravnborg
@ 2011-04-21 21:13 ` Eric Dumazet
  2011-04-21 21:17   ` Joe Perches
  2011-04-21 21:31   ` [PATCH] kbuild: fix W=1 with gcc 4.1.2 / 4.3.2 Sam Ravnborg
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2011-04-21 21:13 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Michal Marek, linux-kbuild, lkml, Dave Jones

Le jeudi 21 avril 2011 à 23:08 +0200, Sam Ravnborg a écrit :
> Building a kernel using W=1 with gcc 4.3.2 failed like this:
> 
>     cc1: error: unrecognized command line option "-Wpacked-bitfield-compat"
> 
> Make use of this option dependent on the compiler.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Dave Jones <davej@redhat.com>
> ---
> I do not see this a stable material - people running stable kernels
> have less value of W=1.
> 
> And the amount of warnings are outright silly. We should really
> divide this up a bit so W=1 is semi usefull.
> 
> 	Sam
> 
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index d5f925a..b280284 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -73,7 +73,7 @@ KBUILD_EXTRA_WARNINGS += -Wnested-externs
>  KBUILD_EXTRA_WARNINGS += -Wold-style-definition
>  KBUILD_EXTRA_WARNINGS += $(call cc-option, -Woverlength-strings,)
>  KBUILD_EXTRA_WARNINGS += -Wpacked
> -KBUILD_EXTRA_WARNINGS += -Wpacked-bitfield-compat
> +KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wpacked-bitfield-compat)
>  KBUILD_EXTRA_WARNINGS += -Wpadded
>  KBUILD_EXTRA_WARNINGS += -Wpointer-arith
>  KBUILD_EXTRA_WARNINGS += -Wredundant-decls
> --

Please add same fix for gcc-4.1.2

cc1: error: unrecognized command line option "-Wlogical-op"






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kbuild: fix W=1 with gcc 4.3.2
  2011-04-21 21:13 ` Eric Dumazet
@ 2011-04-21 21:17   ` Joe Perches
  2011-04-21 21:31   ` [PATCH] kbuild: fix W=1 with gcc 4.1.2 / 4.3.2 Sam Ravnborg
  1 sibling, 0 replies; 4+ messages in thread
From: Joe Perches @ 2011-04-21 21:17 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Sam Ravnborg, Michal Marek, linux-kbuild, lkml, Dave Jones

On Thu, 2011-04-21 at 23:13 +0200, Eric Dumazet wrote:
> Le jeudi 21 avril 2011 à 23:08 +0200, Sam Ravnborg a écrit :
> > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
[]
> > index d5f925a..b280284 100644
> > --- a/scripts/Makefile.build
> > +++ b/scripts/Makefile.build
> > @@ -73,7 +73,7 @@ KBUILD_EXTRA_WARNINGS += -Wnested-externs
> >  KBUILD_EXTRA_WARNINGS += -Wold-style-definition
> >  KBUILD_EXTRA_WARNINGS += $(call cc-option, -Woverlength-strings,)
> >  KBUILD_EXTRA_WARNINGS += -Wpacked
> > -KBUILD_EXTRA_WARNINGS += -Wpacked-bitfield-compat
> > +KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wpacked-bitfield-compat)
> >  KBUILD_EXTRA_WARNINGS += -Wpadded
> >  KBUILD_EXTRA_WARNINGS += -Wpointer-arith
> >  KBUILD_EXTRA_WARNINGS += -Wredundant-decls
> > --
> Please add same fix for gcc-4.1.2
> cc1: error: unrecognized command line option "-Wlogical-op"

Maybe it'd be easier if all of these were
$(call cc-option, ...)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] kbuild: fix W=1 with gcc 4.1.2 / 4.3.2
  2011-04-21 21:13 ` Eric Dumazet
  2011-04-21 21:17   ` Joe Perches
@ 2011-04-21 21:31   ` Sam Ravnborg
  1 sibling, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2011-04-21 21:31 UTC (permalink / raw)
  To: Eric Dumazet, Michal Marek; +Cc: Michal Marek, linux-kbuild, lkml, Dave Jones

>From dbe15094545e5d6900bde8794df8f42ee5c948d0 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Thu, 21 Apr 2011 23:27:24 +0200
Subject: [PATCH] kbuild: fix W=1 with gcc 4.1.2 / 4.3.2

Building a kernel using W=1 with gcc 4.3.2 failed like this:

    cc1: error: unrecognized command line option "-Wpacked-bitfield-compat"

Eric Dumazet <eric.dumazet@gmail.com> reported
that gcc 4.1.2 failed like this:

    cc1: error: unrecognized command line option "-Wpacked-bitfield-compat"

Make these options dependent on the compiler.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Dave Jones <davej@redhat.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
---

I considered wrapping all warnings in $(call cc-option, ...)
but I think we have the relevant warning options nailed now.

	Sam

 scripts/Makefile.build |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index d5f925a..f43aef7 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -64,7 +64,7 @@ KBUILD_EXTRA_WARNINGS += -Wcast-qual
 KBUILD_EXTRA_WARNINGS += -Wcast-align
 KBUILD_EXTRA_WARNINGS += -Wconversion
 KBUILD_EXTRA_WARNINGS += -Wdisabled-optimization
-KBUILD_EXTRA_WARNINGS += -Wlogical-op
+KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wlogical-op)
 KBUILD_EXTRA_WARNINGS += -Wmissing-declarations
 KBUILD_EXTRA_WARNINGS += -Wmissing-format-attribute
 KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wmissing-include-dirs,)
@@ -73,7 +73,7 @@ KBUILD_EXTRA_WARNINGS += -Wnested-externs
 KBUILD_EXTRA_WARNINGS += -Wold-style-definition
 KBUILD_EXTRA_WARNINGS += $(call cc-option, -Woverlength-strings,)
 KBUILD_EXTRA_WARNINGS += -Wpacked
-KBUILD_EXTRA_WARNINGS += -Wpacked-bitfield-compat
+KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wpacked-bitfield-compat)
 KBUILD_EXTRA_WARNINGS += -Wpadded
 KBUILD_EXTRA_WARNINGS += -Wpointer-arith
 KBUILD_EXTRA_WARNINGS += -Wredundant-decls
-- 
1.6.0.6


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-21 21:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-21 21:08 [PATCH] kbuild: fix W=1 with gcc 4.3.2 Sam Ravnborg
2011-04-21 21:13 ` Eric Dumazet
2011-04-21 21:17   ` Joe Perches
2011-04-21 21:31   ` [PATCH] kbuild: fix W=1 with gcc 4.1.2 / 4.3.2 Sam Ravnborg

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®