Skip to content

Commit

Permalink
MIPS: Add -Werror to arch/mips/Kbuild
Browse files Browse the repository at this point in the history
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>
To: linux-mips <linux-mips@linux-mips.org>
To: Wu Zhangjin <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/1301/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
sravnborg authored and ralfbaechle committed Aug 5, 2010
1 parent 9aeb404 commit 66f9ba1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions arch/mips/Kbuild
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 0 additions & 2 deletions arch/mips/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 0 additions & 1 deletion arch/mips/math-emu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions arch/mips/mm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 66f9ba1

Please sign in to comment.