summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-10-14 08:48:58 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-05 22:33:22 +0000
commitb063b982a4b1d1a28cc35ff9b60bb6b310fe344a (patch)
treea329a121ea49739034209be5e9d8aace9d464f88 /meta/recipes-extended
parente2eb8aff27c9912ce01b4938daecd0f94308bf6a (diff)
downloadpoky-b063b982a4b1d1a28cc35ff9b60bb6b310fe344a.tar.gz
mdadm: Fix build with gcc < 7
Do not rely on build host gcc for "implicit-fallthrough" support we need to check the CC for it (From OE-Core rev: b36100bb3077947361c858f891eb15a76013671e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch31
-rw-r--r--meta/recipes-extended/mdadm/mdadm_4.0.bb1
2 files changed, 32 insertions, 0 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
new file mode 100644
index 0000000000..a4b7b8acd3
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
@@ -0,0 +1,31 @@
1From 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
diff --git a/meta/recipes-extended/mdadm/mdadm_4.0.bb b/meta/recipes-extended/mdadm/mdadm_4.0.bb
index 506b0bc315..dc098f19b6 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.0.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.0.bb
@@ -21,6 +21,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
21 file://0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch \ 21 file://0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch \
22 file://0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch \ 22 file://0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch \
23 file://0005-Add-a-comment-to-indicate-valid-fallthrough.patch \ 23 file://0005-Add-a-comment-to-indicate-valid-fallthrough.patch \
24 file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \
24 " 25 "
25SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d" 26SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d"
26SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9" 27SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9"