projects/linux·commit 4b2e0162

fs/proc: Add compiler check for -Wno-override-init to support gcc < 4.2

4b2e0162 · Geert Uytterhoeven <[email protected]> · 2016-08-03 17:33:32 +02:00

With gcc < 4.2 (e.g. 4.1.2):

      CC      fs/proc/task_mmu.o
    cc1: error: unrecognized command line option "-Wno-override-init"

To fix this, only enable the compiler option when it is actually
supported by the compiler.

Fixes: ca52953f5f24 ("fs/proc/task_mmu.c: suppress compilation warnings with W=1")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Valdis Kletnieks <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
4b2e0162e4ab1a976eec0a36ca0bd920b02bfff3
Parents
f0936155

Changes

1 files changed · +1 −1

FileStatusAddDelContent
fs/proc/Makefilemodified+1−1View file

fs/proc/Makefile

View file
diff --git a/fs/proc/Makefile b/fs/proc/Makefile
index a8c1360..12c6922 100644
--- a/fs/proc/Makefile
+++ b/fs/proc/Makefile
@@ -4,7 +4,7 @@
obj-y += proc.o
-CFLAGS_task_mmu.o += -Wno-override-init
+CFLAGS_task_mmu.o += $(call cc-option,-Wno-override-init,)
proc-y := nommu.o task_nommu.o
proc-$(CONFIG_MMU) := task_mmu.o