All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 09/12] linux-yocto: Fix build with gcc8 for ppc
Date: Wed,  6 Jun 2018 14:37:25 -0700	[thread overview]
Message-ID: <227283c3a4f6736d716c89879aa74b438861bc1d.1528320772.git.raj.khem@gmail.com> (raw)
In-Reply-To: <cover.1528320772.git.raj.khem@gmail.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...e-attribute-alias-warnings-from-gcc8.patch | 31 +++++++++++++++++++
 ...isable-array-bounds-warning-with-gcc.patch | 28 +++++++++++++++++
 meta/recipes-kernel/linux/linux-yocto_4.15.bb |  4 +++
 3 files changed, 63 insertions(+)
 create mode 100644 meta/recipes-kernel/linux/files/0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch
 create mode 100644 meta/recipes-kernel/linux/files/0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch

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 0000000000..735e6e62e0
--- /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@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@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 0000000000..7d6e0f20f6
--- /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@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@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 70bd7118bd..31d96ef434 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)}"
-- 
2.17.1



  parent reply	other threads:[~2018-06-06 21:37 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06 21:37 [PATCH V2 00/12] Add GCC 8 recipes Khem Raj
2018-06-06 21:37 ` [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu Khem Raj
2018-06-06 22:15   ` Andre McCurdy
2018-06-06 22:43     ` Khem Raj
2018-06-06 23:42       ` Andre McCurdy
2018-06-07  5:58         ` Khem Raj
2018-06-07  6:36           ` Martin Jansa
2018-06-07 16:55             ` Khem Raj
2018-06-07  7:14           ` Andre McCurdy
2018-06-07 14:04             ` Khem Raj
2018-06-07 23:38               ` Andre McCurdy
2018-06-08  0:57                 ` Khem Raj
2018-06-08  1:20                   ` Andre McCurdy
2018-06-08  1:48                     ` Khem Raj
2018-06-08  8:12                     ` Khem Raj
2018-06-06 21:37 ` [PATCH 02/12] valgrind: Remove code to remove -mcpu option on arm Khem Raj
2018-06-06 21:37 ` [PATCH 03/12] tune-mips-74k.inc: add tune file for 74kc mips Khem Raj
2018-06-06 21:37 ` [PATCH 04/12] gcc-8: Add recipes for 8.1 release Khem Raj
2018-06-06 21:37 ` [PATCH 05/12] gcc-8: Disable libssp for non mingw targets Khem Raj
2018-06-06 21:37 ` [PATCH 06/12] gcc-8: Disable float128 for ppc/musl Khem Raj
2018-06-06 21:37 ` [PATCH 07/12] gcc-8: Enabled mspe options for rs6000 ppc backend Khem Raj
2018-06-06 21:37 ` [PATCH 08/12] tcmode-default: Switch to gcc 8.0 Khem Raj
2018-06-06 21:37 ` Khem Raj [this message]
2018-06-06 21:37 ` [PATCH 10/12] linux-yocto: Fix mips build with gcc8 Khem Raj
2018-06-06 21:37 ` [PATCH 11/12] linux-yocto: Fix mips64 " Khem Raj
2018-06-06 21:37 ` [PATCH 12/12] linux-yocto: Fix GCC 8 -Wrestrict error Khem Raj
2018-06-07  0:45 ` [PATCH V2 00/12] Add GCC 8 recipes Bruce Ashfield
2018-06-07 10:42   ` Richard Purdie
2018-06-07 12:08     ` Kevin Hao
2018-06-07 13:58     ` Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=227283c3a4f6736d716c89879aa74b438861bc1d.1528320772.git.raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.