mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs/proc: Add compiler check for -Wno-override-init to support gcc < 4.2
@ 2016-08-03 15:33 Geert Uytterhoeven
  2016-08-03 15:51 ` Valdis.Kletnieks
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2016-08-03 15:33 UTC (permalink / raw)
  To: Valdis Kletnieks, Andrew Morton, Linus Torvalds
  Cc: linux-kernel, Geert Uytterhoeven

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: ca52953f5f24aff0 ("fs/proc/task_mmu.c: suppress compilation warnings with W=1")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 fs/proc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/proc/Makefile b/fs/proc/Makefile
index a8c13605b43482a7..12c6922c913c4519 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
 
-- 
1.9.1

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

end of thread, other threads:[~2016-08-03 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-03 15:33 [PATCH] fs/proc: Add compiler check for -Wno-override-init to support gcc < 4.2 Geert Uytterhoeven
2016-08-03 15:51 ` Valdis.Kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®