All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] mips: diverse Makefile updates
@ 2010-05-30 14:19 Sam Ravnborg
  2010-05-30 14:26 ` [PATCH 1/6] mips: introduce arch/mips/Kbuild Sam Ravnborg
                   ` (11 more replies)
  0 siblings, 12 replies; 25+ messages in thread
From: Sam Ravnborg @ 2010-05-30 14:19 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle, Wu Zhangjin; +Cc: sam

This patchset does the following:
- introduce arch/mips/Kbuild
- use -Werror on all core-y files of the mips kernel
- introduce a distributed way to specify platform definitions
- refactor a few Makefiles
- clean up cleaning 

Ralf asked in private mail if I could try to implement
a working varient of a suggestion I made some time ago.
The idea was to move platform specific definitions to
dedicated platfrom files.

This is implmented in the third patch.

The idea is to move the platform definitions from arch/mips/Makefile
to arch/mips/<platform>/Platfrom

The content of this file is used in arch/mips/Makefile
and arch/mips/Kbuild.

On top of this is a few patches that refactor the
boot and boot/compressed Makefiles so they are more
kbuild conformant.
This beautify the output when we build a kernel.

Wu Zhangjin have pointed out a few bugs in the first
variants of the patches that hit the mailing list - thanks!


Patches will follow.

Note: I tried to test a little with bigsur_defconfig
but get_user() is buggy. Or at least my gcc thinks that
first argument may be used uninitialized.
I think mips needs to fix the 64 bit variant of get_user().
I took a quick look but ran away.

	Sam


Sam Ravnborg (6):
      mips: introduce arch/mips/Kbuild
      mips: add -Werror to arch/mips/Kbuild
      mips: introduce support for Platform definitions
      mips: refactor arch/mips/boot/Makefile
      mips: refactor arch/mips/boot/compressed/Makefile
      mips: clean up arch/mips/Makefile

 arch/mips/Kbuild                   |   15 +++++++++
 arch/mips/Kbuild.platforms         |    6 ++++
 arch/mips/Makefile                 |   57 +++++++++---------------------------
 arch/mips/ar7/Platform             |    7 ++++
 arch/mips/boot/Makefile            |   49 ++++++++++++++----------------
 arch/mips/boot/compressed/Makefile |   54 ++++++++++++++++++----------------
 arch/mips/kernel/Makefile          |    2 -
 arch/mips/math-emu/Makefile        |    1 -
 arch/mips/mm/Makefile              |    2 -
 9 files changed, 94 insertions(+), 99 deletions(-)

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [PATCH 2/6] mips: add -Werror to arch/mips/Kbuild
@ 2010-05-30 11:30 Sam Ravnborg
  0 siblings, 0 replies; 25+ messages in thread
From: Sam Ravnborg @ 2010-05-30 11:30 UTC (permalink / raw)


Adding subdirs-ccflags-y := -Werror to arch/mips/Kbuild
let us in one go cover all files with -Werror.

In addition this allows us to remove the
individual -Werror definition in various Makefile.

Adding the definition to Kbuild as a recursive
option help us not to forget to do so.

With this change we now compile arch/mips/kernel/cpufreq with -Werror

One drawback:
When specifying a subdirectory covered by the Kbuild file like this:

    make arch/mips/kernel/

then kbuild fails to pick up the -Werror definition.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 arch/mips/Kbuild            |    6 ++++++
 arch/mips/kernel/Makefile   |    2 --
 arch/mips/math-emu/Makefile |    1 -
 arch/mips/mm/Makefile       |    2 --
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/mips/Kbuild b/arch/mips/Kbuild
index a18eb5d..6ce9382 100644
--- a/arch/mips/Kbuild
+++ b/arch/mips/Kbuild
@@ -1,3 +1,9 @@
+# Fail on warnings - also for files referenced in subdirs
+# -Werror can be disabled for specific files using:
+# CFLAGS_<file.o> := -Wno-error
+subdir-ccflags-y := -Werror
+
+
 # mips object files
 # The object files are linked as core-y files would be linked
 
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 7a6ac50..ff5ec2e 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -101,6 +101,4 @@ obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT)	+= 8250-platform.o
 
 obj-$(CONFIG_MIPS_CPUFREQ)	+= cpufreq/
 
-EXTRA_CFLAGS += -Werror
-
 CPPFLAGS_vmlinux.lds		:= $(KBUILD_CFLAGS)
diff --git a/arch/mips/math-emu/Makefile b/arch/mips/math-emu/Makefile
index d547efd..9660723 100644
--- a/arch/mips/math-emu/Makefile
+++ b/arch/mips/math-emu/Makefile
@@ -10,4 +10,3 @@ obj-y	:= cp1emu.o ieee754m.o ieee754d.o ieee754dp.o ieee754sp.o ieee754.o \
 	   sp_scalb.o sp_simple.o sp_tint.o sp_fint.o sp_tlong.o sp_flong.o \
 	   dp_sqrt.o sp_sqrt.o kernel_linkage.o dsemul.o
 
-EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile
index f0e4355..d679c77 100644
--- a/arch/mips/mm/Makefile
+++ b/arch/mips/mm/Makefile
@@ -34,5 +34,3 @@ obj-$(CONFIG_IP22_CPU_SCACHE)	+= sc-ip22.o
 obj-$(CONFIG_R5000_CPU_SCACHE)  += sc-r5k.o
 obj-$(CONFIG_RM7000_CPU_SCACHE)	+= sc-rm7k.o
 obj-$(CONFIG_MIPS_CPU_SCACHE)	+= sc-mips.o
-
-EXTRA_CFLAGS += -Werror
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2010-06-01 10:28 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-30 14:19 [PATCH 0/6] mips: diverse Makefile updates Sam Ravnborg
2010-05-30 14:26 ` [PATCH 1/6] mips: introduce arch/mips/Kbuild Sam Ravnborg
2010-05-30 14:26 ` [PATCH 2/6] mips: add -Werror to arch/mips/Kbuild Sam Ravnborg
2010-05-30 14:27 ` [PATCH 3/6] mips: introduce support for Platform definitions Sam Ravnborg
2010-05-30 14:27 ` [PATCH 4/6] mips: refactor arch/mips/boot/Makefile Sam Ravnborg
2010-05-30 14:28 ` [PATCH 5/6] mips: refactor arch/mips/boot/compressed/Makefile Sam Ravnborg
2010-05-30 14:28 ` [PATCH 6/6] mips: clean up arch/mips/Makefile Sam Ravnborg
2010-05-30 15:39 ` [PATCH 0/6] mips: diverse Makefile updates Sam Ravnborg
2010-05-30 23:19   ` Ralf Baechle
2010-05-31 10:29     ` Ralf Baechle
2010-05-31 10:55       ` Sam Ravnborg
2010-06-01 10:28         ` Ralf Baechle
2010-05-30 18:03 ` [ Sam Ravnborg
2010-05-30 18:06 ` [PATCH] mips: fix uninitialized warning when using get_user() Sam Ravnborg
2010-05-31  8:45 ` [PATCH 0/6] mips: diverse Makefile updates Wu Zhangjin
2010-05-31  9:10   ` Sam Ravnborg
2010-05-31 14:56 ` Ralf Baechle
2010-05-31 15:33 ` Manuel Lauss
2010-05-31 18:03   ` [PATCH] mips: fix build with O= Sam Ravnborg
2010-05-31 18:03     ` Sam Ravnborg
2010-05-31 18:19     ` Manuel Lauss
2010-05-31 19:00       ` Sam Ravnborg
2010-05-31 22:36         ` Ralf Baechle
2010-05-31 22:46     ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2010-05-30 11:30 [PATCH 2/6] mips: add -Werror to arch/mips/Kbuild Sam Ravnborg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.