summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-03-07 17:51:20 -0800
committerKhem Raj <raj.khem@gmail.com>2021-03-08 16:11:28 -0800
commit4106cbcaa92c3f00921b2b5955293d707a03c83a (patch)
treef2052aec23b1dc8ae2503d2d235372342f7da934
parent355afa175787db39954ad3cff05e9c464976d547 (diff)
downloadopenembedded-core-contrib-kraj/qemuppc64le.tar.gz
linux-yocto_5.10.bb: Workaround a GCC 11 ICE on x86kraj/qemuppc64le
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta/recipes-kernel/linux/files/0001-Use-Os-to-compile-broadcom-tg3.c.patch29
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_5.10.bb2
2 files changed, 30 insertions, 1 deletions
diff --git a/meta/recipes-kernel/linux/files/0001-Use-Os-to-compile-broadcom-tg3.c.patch b/meta/recipes-kernel/linux/files/0001-Use-Os-to-compile-broadcom-tg3.c.patch
new file mode 100644
index 0000000000..9584efae16
--- /dev/null
+++ b/meta/recipes-kernel/linux/files/0001-Use-Os-to-compile-broadcom-tg3.c.patch
@@ -0,0 +1,29 @@
+From b510256cda566e0eda4e1cc9ccbeae2de2a4539e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 7 Mar 2021 13:00:37 -0800
+Subject: [PATCH] Use -Os to compile broadcom/tg3.c
+
+Workaround for GCC 11 bug
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ drivers/net/ethernet/broadcom/tg3.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
+index 5143cdd0eeca..6737bcd9b154 100644
+--- a/drivers/net/ethernet/broadcom/tg3.c
++++ b/drivers/net/ethernet/broadcom/tg3.c
+@@ -21,6 +21,9 @@
+ * notice is accompanying it.
+ */
+
++#if __GNUC__ >= 11
++#pragma GCC optimize ("Os")
++#endif
+
+ #include <linux/module.h>
+ #include <linux/moduleparam.h>
+--
+2.30.1
+
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.10.bb b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
index d40fa7eafe..542503078c 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
@@ -28,7 +28,7 @@ SRCREV_meta ?= "67e74d52f2aaa17ca7041032714368ea81bc8823"
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-5.10;destsuffix=${KMETA}"
-
+SRC_URI += "file://0001-Use-Os-to-compile-broadcom-tg3.c.patch"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
LINUX_VERSION ?= "5.10.19"