[10/12] linux-yocto: Fix mips build with gcc8

Message ID 1ff58046b4eef02b93398683e15592165513018e.1528320772.git.raj.khem@gmail.com
State New
Headers show
Series
  • Add GCC 8 recipes
Related show

Commit Message

Khem Raj June 6, 2018, 9:37 p.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...ips-Disable-attribute-alias-warnings.patch | 43 +++++++++++++++++++
 meta/recipes-kernel/linux/linux-yocto_4.15.bb |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta/recipes-kernel/linux/files/0001-mips-Disable-attribute-alias-warnings.patch

-- 
2.17.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-kernel/linux/files/0001-mips-Disable-attribute-alias-warnings.patch b/meta/recipes-kernel/linux/files/0001-mips-Disable-attribute-alias-warnings.patch
new file mode 100644
index 0000000000..f24d933bcb
--- /dev/null
+++ b/meta/recipes-kernel/linux/files/0001-mips-Disable-attribute-alias-warnings.patch
@@ -0,0 +1,43 @@ 
+From bb47f1bdc9243117bf8009f1c265b2a8feaf9c58 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 4 May 2018 11:49:35 -0700
+Subject: [PATCH] mips: Disable attribute-alias warnings
+
+This warning is seen with gcc-8
+include/linux/syscalls.h:211:18: error: 'sys_cachectl' alias between functions of incom
+patible types 'long int(char *, int,  int)' and 'long int(long int,  long int,  long int)'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ arch/mips/kernel/Makefile | 2 ++
+ arch/mips/mm/Makefile     | 1 +
+ 2 files changed, 3 insertions(+)
+
+diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
+index f10e1e15e1c6..eb92e52eb3db 100644
+--- a/arch/mips/kernel/Makefile
++++ b/arch/mips/kernel/Makefile
+@@ -2,6 +2,8 @@
+ #
+ # Makefile for the Linux/MIPS kernel.
+ #
++CFLAGS_signal.o		+= $(call cc-disable-warning, attribute-alias)
++CFLAGS_syscall.o	+= $(call cc-disable-warning, attribute-alias)
+ 
+ extra-y		:= head.o vmlinux.lds
+ 
+diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile
+index c463bdad45c7..b7f9ef80dac7 100644
+--- a/arch/mips/mm/Makefile
++++ b/arch/mips/mm/Makefile
+@@ -2,6 +2,7 @@
+ #
+ # Makefile for the Linux/MIPS-specific parts of the memory manager.
+ #
++CFLAGS_cache.o			+= $(call cc-disable-warning, attribute-alias)
+ 
+ obj-y				+= cache.o dma-default.o extable.o fault.o \
+ 				   gup.o init.o mmap.o page.o page-funcs.o \
+-- 
+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 31d96ef434..d579ffd645 100644
--- a/meta/recipes-kernel/linux/linux-yocto_4.15.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_4.15.bb
@@ -26,6 +26,7 @@  SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
 
 SRC_URI += "file://0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch \
             file://0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch \
+            file://0001-mips-Disable-attribute-alias-warnings.patch \
 "
 
 LINUX_VERSION ?= "4.15.13"