From: Sam Ravnborg <sam@ravnborg.org>
To: linux-kbuild <linux-kbuild@vger.kernel.org>,
linux arch <linux-arch@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: kbuild - introduce support for subdir-ccflags-y
Date: Sat, 18 Apr 2009 19:55:19 +0200 [thread overview]
Message-ID: <20090418175519.GA25541@uranus.ravnborg.org> (raw)
In-Reply-To: <20090418125839.GA3668@flint.arm.linux.org.uk>
On Sat, Apr 18, 2009 at 01:58:39PM +0100, Russell King wrote:
> On Sat, Apr 18, 2009 at 02:51:59PM +0200, Sam Ravnborg wrote:
> > The typical use cases are an architecture or a subsystem that
> > decide to cover all files with -Werror.
> > Today alpha, mips and sparc uses -Werror in almost all their
> > Makefile - with subdir-ccflag-y it is now simpler to do so
> > as only the top-level directories needs to be covered.
>
> Hmm, this won't make sense for ARM. We have things like #warning and
> deprecated functions in machine specific headers, and adding -Werror
> to the whole of arch/arm/ will result in these causing builds to fail.
For arm I would suggest the following preparational patch:
diff --git a/arch/arm/Kbuild b/arch/arm/Kbuild
new file mode 100644
index 0000000..33b6645
--- /dev/null
+++ b/arch/arm/Kbuild
@@ -0,0 +1,7 @@
+# core part of arm kernel
+# The file is referenced from arch/arm/Makefile
+
+core-y += kernel/ mm/ common/
+core-$(CONFIG_FPE_NWFPE) += nwfpe/
+core-$(CONFIG_VFP) += arch/arm/vfp/
+
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index e84729b..5ccdca1 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -186,18 +186,9 @@ endif
export TEXT_OFFSET GZFLAGS MMUEXT
-# Do we have FASTFPE?
-FASTFPE :=arch/arm/fastfpe
-ifeq ($(FASTFPE),$(wildcard $(FASTFPE)))
-FASTFPE_OBJ :=$(FASTFPE)/
-endif
-
# If we have a machine-specific directory, then include it in the build.
-core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/
+core-y += arch/arm/
core-y += $(machdirs) $(platdirs)
-core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/
-core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ)
-core-$(CONFIG_VFP) += arch/arm/vfp/
drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
[The above patch include deletion of unused FASTFPE stuff]
Then to cover all of kernel/ mm/ common/ nwfpe/ and vfp/
is a single line in arch/arm/Kbuild.
Another benefit of arch/arm/Kbuild is that you can use:
make arch/arm/
and get all the above listed directories built.
You would need dedicated subdir-* for oprofile/ as
it is linked together with drivers.
And for machine and platforms it would be a case-by-case
decision.
So it can be of benefit for arm too - but only if a preparational
step is done (which brings in other benefits).
If you want the preparational patch - independent of subdir-* support
then let me know and I will submit a proper patch to you.
Sam
prev parent reply other threads:[~2009-04-18 17:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-18 12:51 kbuild - introduce support for subdir-ccflags-y Sam Ravnborg
2009-04-18 12:58 ` Russell King
2009-04-18 15:07 ` Ingo Molnar
2009-04-18 18:09 ` Russell King
2009-04-19 3:17 ` Kyle Moffett
2009-04-19 6:28 ` Sam Ravnborg
2009-04-19 8:59 ` Ingo Molnar
2009-04-18 17:55 ` Sam Ravnborg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090418175519.GA25541@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=davem@davemloft.net \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox