Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1455865 > unrolled thread

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

Started byGeert Uytterhoeven <geert@linux-m68k.org>
First post2016-08-03 17:40 +0200
Last post2016-08-03 18:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] fs/proc: Add compiler check for -Wno-override-init to support gcc < 4.2 Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-03 17:40 +0200
    Re: [PATCH] fs/proc: Add compiler check for -Wno-override-init to support gcc < 4.2 Valdis.Kletnieks@vt.edu - 2016-08-03 18:50 +0200

#1455865 — [PATCH] fs/proc: Add compiler check for -Wno-override-init to support gcc < 4.2

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-08-03 17:40 +0200
Subject[PATCH] fs/proc: Add compiler check for -Wno-override-init to support gcc < 4.2
Message-ID<s26qZ-4iv-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1455892

FromValdis.Kletnieks@vt.edu
Date2016-08-03 18:50 +0200
Message-ID<s27wJ-4Vz-7@gated-at.bofh.it>
In reply to#1455865

[Multipart message — attachments visible in raw view] — view raw

On Wed, 03 Aug 2016 17:33:32 +0200, Geert Uytterhoeven said:
> 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.

Whoops, sorry about that.


[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web