From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pfepa.post.tele.dk ([195.41.46.235]:35418 "EHLO pfepa.post.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750766Ab1CJKZO (ORCPT ); Thu, 10 Mar 2011 05:25:14 -0500 Date: Thu, 10 Mar 2011 11:25:11 +0100 From: Sam Ravnborg Subject: Re: [PATCH -v5] kbuild: Add extra gcc checks Message-ID: <20110310102511.GA30886@merkur.ravnborg.org> References: <20110301083529.GA767@liondog.tnic> <20110309144504.GA1096@sepie.suse.cz> <20110309151134.GA15730@elte.hu> <20110309175625.GA29181@merkur.ravnborg.org> <20110310090444.GA25522@elte.hu> <4D78971C.6090107@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D78971C.6090107@suse.cz> Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Michal Marek Cc: Ingo Molnar , Borislav Petkov , Arnd Bergmann , torvalds@linux-foundation.org, x86@kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, bp@amd64.org > One way without extending the current rules could be: > > ifdef CONFIG_CC_WERROR > Werror := -Werror > endif > > CFLAGS_sched.o := $(Werror) > CFLAGS_another.o := $(Werror) > > What do you think? We could extend kbuild to support something like this: ccflags--y := -Werror Sample: ccflags-sched.o-$(CONFIG_WERROR) := -Werror The above is a nice counterpart to the existing ccflags-y. And we could then deprecate CLFAGS_ as we have today. To remove options we could use: ccflags--remove-y := -pg This is a replacement of the undocumented CFLAGS_REMOVE_ variant. Today: ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_lockdep.o = -pg endif Could be replaced with: ccflags-lockdep.o-remove-$(CONFIG_FUNCTION_TRACER) := -pg The ifdef often cover more than one file so we save less lines in reality than the example says. All looks rather trivial to implement. But it is maybe a bit too cryptic? Sam