[oe-commits] [openembedded-core] 19/122: mdadm: Fix build with gcc < 7

git at git.openembedded.org git at git.openembedded.org
Mon Dec 4 17:24:57 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch rocko
in repository openembedded-core.

commit 8dae7b56b85e098eda1517eb7f50f37c57fb3ba6
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Sat Oct 14 08:48:58 2017 -0700

    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
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    (cherry picked from commit b36100bb3077947361c858f891eb15a76013671e)
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 ...heck-for-implicit-fallthrough-warning-sup.patch | 31 ++++++++++++++++++++++
 meta/recipes-extended/mdadm/mdadm_4.0.bb           |  1 +
 2 files changed, 32 insertions(+)

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 0000000..a4b7b8a
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
@@ -0,0 +1,31 @@
+From a129ee6d80f3b2cda0d827c35fa81a517cf6d505 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 13 Oct 2017 10:27:34 -0700
+Subject: [PATCH] Use CC to check for implicit-fallthrough warning support
+
+This warning it new in gcc7 and in cross compile case
+its possible that build host gcc is version 7+ but the
+cross compile used for compiling mdadm is < version 7
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+Upstream-Status: Pending
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index d207ee4..971f255 100644
+--- a/Makefile
++++ b/Makefile
+@@ -48,7 +48,7 @@ ifdef WARN_UNUSED
+ CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
+ endif
+ 
+-FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l)
++FALLTHROUGH := $(shell ${CC} -v --help 2>&1 | grep "implicit-fallthrough" | wc -l)
+ ifneq "$(FALLTHROUGH)"  "0"
+ CWFLAGS += -Wimplicit-fallthrough=0
+ endif
+-- 
+2.14.2
+
diff --git a/meta/recipes-extended/mdadm/mdadm_4.0.bb b/meta/recipes-extended/mdadm/mdadm_4.0.bb
index 506b0bc..dc098f1 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 \
            file://0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch \
            file://0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch \
            file://0005-Add-a-comment-to-indicate-valid-fallthrough.patch \
+           file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \
            "
 SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d"
 SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list