From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757730AbcHCPdn (ORCPT ); Wed, 3 Aug 2016 11:33:43 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:41669 "EHLO xavier.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755671AbcHCPdk (ORCPT ); Wed, 3 Aug 2016 11:33:40 -0400 From: Geert Uytterhoeven To: Valdis Kletnieks , Andrew Morton , Linus Torvalds Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] fs/proc: Add compiler check for -Wno-override-init to support gcc < 4.2 Date: Wed, 3 Aug 2016 17:33:32 +0200 Message-Id: <1470238412-20299-1-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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