From: Andi Kleen <a...@linux.intel.com>

Disable LTO for the BPF interpreter. This works around a gcc bug in the LTO
partitioner that partitions the jumptable from the BPF interpreter
into a different LTO unit. This in term causes assembler
errors because the jump table contains references to the
code labels in the original file.

gcc problem tracked in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50676

Signed-off-by: Andi Kleen <a...@linux.intel.com>
Signed-off-by: Tom Zanussi <tom.zanu...@linux.intel.com>
---
 kernel/bpf/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/bpf/Makefile b/kernel/bpf/Makefile
index 1327258..9cf616b 100644
--- a/kernel/bpf/Makefile
+++ b/kernel/bpf/Makefile
@@ -2,3 +2,8 @@ obj-y := core.o
 
 obj-$(CONFIG_BPF_SYSCALL) += syscall.o verifier.o inode.o helpers.o
 obj-$(CONFIG_BPF_SYSCALL) += hashtab.o arraymap.o
+
+# various version of gcc have a LTO bug where the &&labels used in the
+# BPF interpreter can cause linker errors when spread incorrectly over
+# partitions. Disable LTO for BPF for now
+CFLAGS_core.o = $(DISABLE_LTO)
-- 
2.6.6

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to