[oe-commits] [openembedded-core] 09/12: linux-yocto: Fix build with gcc8 for ppc

git at git.openembedded.org git at git.openembedded.org
Wed Jun 6 23:31:58 UTC 2018


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

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

commit 1aeac9ce33eca3bf4f7e30986ca38cba1258d190
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Wed Jun 6 14:37:25 2018 -0700

    linux-yocto: Fix build with gcc8 for ppc
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 ...isable-attribute-alias-warnings-from-gcc8.patch | 31 ++++++++++++++++++++++
 ...ace-Disable-array-bounds-warning-with-gcc.patch | 28 +++++++++++++++++++
 meta/recipes-kernel/linux/linux-yocto_4.15.bb      |  4 +++
 3 files changed, 63 insertions(+)

diff --git a/meta/recipes-kernel/linux/files/0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch b/meta/recipes-kernel/linux/files/0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch
new file mode 100644
index 0000000..735e6e6
--- /dev/null
+++ b/meta/recipes-kernel/linux/files/0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch
@@ -0,0 +1,31 @@
+From a043b9e85af743103e71afcef943b359154727f8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 4 May 2018 09:46:42 -0700
+Subject: [PATCH 1/2] powerpc: Disable attribute-alias warnings from gcc8
+
+Fixes
+alias between functions of incompatible types warnings
+which are new with gcc8
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ arch/powerpc/kernel/Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
+index 1b6bc7fba996..7fab5ab9edc2 100644
+--- a/arch/powerpc/kernel/Makefile
++++ b/arch/powerpc/kernel/Makefile
+@@ -3,7 +3,8 @@
+ # Makefile for the linux kernel.
+ #
+ 
+-CFLAGS_ptrace.o		+= -DUTS_MACHINE='"$(UTS_MACHINE)"'
++CFLAGS_ptrace.o		+= -DUTS_MACHINE='"$(UTS_MACHINE)"' $(call cc-disable-warning, attribute-alias)
++CFLAGS_syscalls.o	+= $(call cc-disable-warning, attribute-alias)
+ 
+ subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
+ 
+-- 
+2.17.0
+
diff --git a/meta/recipes-kernel/linux/files/0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch b/meta/recipes-kernel/linux/files/0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch
new file mode 100644
index 0000000..7d6e0f2
--- /dev/null
+++ b/meta/recipes-kernel/linux/files/0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch
@@ -0,0 +1,28 @@
+From e2704b41efba4a6b94cd12e8d220f70d7a3b5c70 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 4 May 2018 09:50:05 -0700
+Subject: [PATCH 2/2] powerpc/ptrace: Disable array-bounds warning with gcc8
+
+This masks the new gcc8 warning
+include/linux/regset.h:270:4: error: 'memcpy' offset [-527, -529] is out of the bounds [0, 16] of object 'vrsave' with type 'union <anonymous>'
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ arch/powerpc/kernel/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
+index 7fab5ab9edc2..601118b43545 100644
+--- a/arch/powerpc/kernel/Makefile
++++ b/arch/powerpc/kernel/Makefile
+@@ -4,6 +4,7 @@
+ #
+ 
+ CFLAGS_ptrace.o		+= -DUTS_MACHINE='"$(UTS_MACHINE)"' $(call cc-disable-warning, attribute-alias)
++CFLAGS_ptrace.o		+= $(call cc-disable-warning, array-bounds)
+ CFLAGS_syscalls.o	+= $(call cc-disable-warning, attribute-alias)
+ 
+ subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
+-- 
+2.17.0
+
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.15.bb b/meta/recipes-kernel/linux/linux-yocto_4.15.bb
index 70bd711..31d96ef 100644
--- a/meta/recipes-kernel/linux/linux-yocto_4.15.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_4.15.bb
@@ -24,6 +24,10 @@ SRCREV_meta ?= "939d935b0c992c6f1e51a7a1c9e4fbe6ef3c3174"
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.15;destsuffix=${KMETA}"
 
+SRC_URI += "file://0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch \
+            file://0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch \
+"
+
 LINUX_VERSION ?= "4.15.13"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"

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


More information about the Openembedded-commits mailing list