summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch')
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch36
1 files changed, 26 insertions, 10 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
index 12bf6a5920..16fdefbbd1 100644
--- a/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
+++ b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
@@ -1,4 +1,4 @@
1From 37c35f94d9d95dbd2b5f8a919f5478be51453590 Mon Sep 17 00:00:00 2001 1From c29d086714b49a6d76ccca83b4a6fa2f139bad6e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 13 Oct 2017 10:27:34 -0700 3Date: Fri, 13 Oct 2017 10:27:34 -0700
4Subject: [PATCH] Use CC to check for implicit-fallthrough warning support 4Subject: [PATCH] Use CC to check for implicit-fallthrough warning support
@@ -10,19 +10,35 @@ cross compile used for compiling mdadm is < version 7
10Signed-off-by: Khem Raj <raj.khem@gmail.com> 10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Upstream-Status: Pending 11Upstream-Status: Pending
12--- 12---
13 Makefile | 2 +- 13 Makefile | 6 +++---
14 1 file changed, 1 insertion(+), 1 deletion(-) 14 1 file changed, 3 insertions(+), 3 deletions(-)
15 15
16diff --git a/Makefile b/Makefile 16diff --git a/Makefile b/Makefile
17index 46bf57b..a075912 100644 17index 7bfd336..9ab6a65 100644
18--- a/Makefile 18--- a/Makefile
19+++ b/Makefile 19+++ b/Makefile
20@@ -53,7 +53,7 @@ ifdef WARN_UNUSED 20@@ -56,21 +56,21 @@ CWFLAGS += -Wp -O3
21 CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
22 endif 21 endif
23 22
24-FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) 23 ifeq ($(origin FALLTHROUGH), undefined)
25+FALLTHROUGH := $(shell ${CC} -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) 24- FALLTHROUGH := $(shell gcc -Q --help=warnings 2>&1 | grep "implicit-fallthrough" | wc -l)
26 ifneq "$(FALLTHROUGH)" "0" 25+ FALLTHROUGH := $(shell ${CC} -Q --help=warnings 2>&1 | grep "implicit-fallthrough" | wc -l)
27 CWFLAGS += -Wimplicit-fallthrough=0 26 ifneq "$(FALLTHROUGH)" "0"
27 CWFLAGS += -Wimplicit-fallthrough=0
28 endif
28 endif 29 endif
30
31 ifeq ($(origin FORMATOVERFLOW), undefined)
32- FORMATOVERFLOW := $(shell gcc -Q --help=warnings 2>&1 | grep "format-overflow" | wc -l)
33+ FORMATOVERFLOW := $(shell ${CC} -Q --help=warnings 2>&1 | grep "format-overflow" | wc -l)
34 ifneq "$(FORMATOVERFLOW)" "0"
35 CWFLAGS += -Wformat-overflow
36 endif
37 endif
38
39 ifeq ($(origin STRINGOPOVERFLOW), undefined)
40- STRINGOPOVERFLOW := $(shell gcc -Q --help=warnings 2>&1 | grep "stringop-overflow" | wc -l)
41+ STRINGOPOVERFLOW := $(shell ${CC} -Q --help=warnings 2>&1 | grep "stringop-overflow" | wc -l)
42 ifneq "$(STRINGOPOVERFLOW)" "0"
43 CWFLAGS += -Wstringop-overflow
44 endif