From patchwork Thu Apr 21 21:31:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 725961 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3LLVn5I014046 for ; Thu, 21 Apr 2011 21:31:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754724Ab1DUVbt (ORCPT ); Thu, 21 Apr 2011 17:31:49 -0400 Received: from pfepa.post.tele.dk ([195.41.46.235]:57718 "EHLO pfepa.post.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754564Ab1DUVbs (ORCPT ); Thu, 21 Apr 2011 17:31:48 -0400 Received: from merkur.ravnborg.org (x1-6-c4-3d-c7-28-70-1a.k498.webspeed.dk [83.89.83.41]) by pfepa.post.tele.dk (Postfix) with ESMTP id 22F16A5001B; Thu, 21 Apr 2011 23:31:46 +0200 (CEST) Date: Thu, 21 Apr 2011 23:31:47 +0200 From: Sam Ravnborg To: Eric Dumazet , Michal Marek Cc: Michal Marek , linux-kbuild , lkml , Dave Jones Subject: [PATCH] kbuild: fix W=1 with gcc 4.1.2 / 4.3.2 Message-ID: <20110421213147.GA9660@merkur.ravnborg.org> References: <20110421210852.GA6196@merkur.ravnborg.org> <1303420403.2784.25.camel@edumazet-laptop> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1303420403.2784.25.camel@edumazet-laptop> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 21 Apr 2011 21:31:49 +0000 (UTC) From dbe15094545e5d6900bde8794df8f42ee5c948d0 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg 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 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 Cc: Dave Jones Cc: Eric Dumazet --- 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