blob: a4b7b8acd3d655e80cd4f197553baa97c7ad9a68 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From a129ee6d80f3b2cda0d827c35fa81a517cf6d505 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 13 Oct 2017 10:27:34 -0700
4Subject: [PATCH] Use CC to check for implicit-fallthrough warning support
5
6This warning it new in gcc7 and in cross compile case
7its possible that build host gcc is version 7+ but the
8cross compile used for compiling mdadm is < version 7
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12Upstream-Status: Pending
13 Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/Makefile b/Makefile
17index d207ee4..971f255 100644
18--- a/Makefile
19+++ b/Makefile
20@@ -48,7 +48,7 @@ ifdef WARN_UNUSED
21 CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
22 endif
23
24-FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l)
25+FALLTHROUGH := $(shell ${CC} -v --help 2>&1 | grep "implicit-fallthrough" | wc -l)
26 ifneq "$(FALLTHROUGH)" "0"
27 CWFLAGS += -Wimplicit-fallthrough=0
28 endif
29--
302.14.2
31