[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120504085635.GA13450@merkur.ravnborg.org>
Date: Fri, 4 May 2012 10:56:35 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: Artem Bityutskiy <dedekind1@...il.com>,
Michal Marek <mmarek@...e.cz>
Cc: Michal Marek <mmarek@...e.cz>,
Linux Kernel Maling List <linux-kernel@...r.kernel.org>,
linux-kbuild <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH 1/2] Makefile: make sure KCFLAGS options are at the end
On Fri, May 04, 2012 at 10:42:34AM +0300, Artem Bityutskiy wrote:
> From: Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>
>
> When I build the kernel like this:
>
> $ make W=1 KCFLAGS="-Wno-sign-compare"
>
> the "-Wno-sign-compare" option is ignore. The reason is that we append gcc
> options associated with W=1 _after_ KCFLAGS, so W=1 overrides my KCFLAGS
> options. This patch tries to fix the issue by moving the "W=[123]" stiff
> from "scripts/Makefile.build" to the main Maikefile. This fixes the issue
> as well as this should be a small improvent because "scripts/Makefile.build"
> is parsed by make many times (I think for each file), bue we do not need
> to re-assign all the warnings stuff so many times - it is enough to do it
> only once.
Moving all the W=... support out of Makefile.build is a good thing,
as we really should do the evaluation only once.
But I detest that this is added to the top-level Makefile.
The top-level Makefile is full of all sort of strange stuff
already and very hard to navigate / update for this reason.
How about introducing a new file : scripts/Kbuild.config
This file should be included only _once_ from the top-level Makefile.
And it should contains all the trivial assignments to
CC, CFLAGS, etc...
Including exporting of variables so they a visible in sub-makes.
First step could be to move the W=... support, and then it could be
gradually extended.
Michal - any comments on this?
Sam
--
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