Re: [PATCH 1/2] Makefile: make sure KCFLAGS options are at the end |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH 1/2] Makefile: make sure KCFLAGS options are at the end
- From: Sam Ravnborg <sam@xxxxxxxxxxxx>
- Date: Fri, 4 May 2012 10:56:35 +0200
- Cc: Michal Marek <mmarek@xxxxxxx>, Linux Kernel Maling List <linux-kernel@xxxxxxxxxxxxxxx>, linux-kbuild <linux-kbuild@xxxxxxxxxxxxxxx>
- In-reply-to: <1336117355-21348-1-git-send-email-dedekind1@gmail.com>
- References: <1336117355-21348-1-git-send-email-dedekind1@gmail.com>
- User-agent: Mutt/1.5.18 (2008-05-17)
On Fri, May 04, 2012 at 10:42:34AM +0300, Artem Bityutskiy wrote:
> From: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>
>
> 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-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux USB Devel]
[Linux Media]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]