linux-misc
linux-misc copied to clipboard
Linux 3.15?
How can we use LTO to build Linux 3.15 on x86?
Upstream mainline Linux 3.15 does not has LTO Kconfig, merging 3.14 changes from this repository ends up in lots of "undefined reference to `.L1'"
It's a gcc bug. in net/core/filter.c __sk_run_filter has a computed goto jump table in a static. But the gcc LTO partitioner moves the jump table into a different LTO partition, which breaks the references to the code labels.
For now I disabled LTO for the file until a better workaround is found or gcc is fixed.
I pushed a new branch lto-linus-3.15 with this change (subset of full LTO tree)
Thanks a million!
gcc bug tracked in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61635
Hope to see that in fixed in GCC 4.9.1...
Man, you are doing an enormous contribution not only to the Linux kernel but also GNU.
Thanks a zillion! On Jun 29, 2014 12:57 AM, "andikleen" [email protected] wrote:
gcc bug tracked in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61635
— Reply to this email directly or view it on GitHub https://github.com/andikleen/linux-misc/issues/12#issuecomment-47431101.
Maybe I'm missing something out here... My Linux 3.14(x86) with LTO, 3.15(x86) with LTO, 3.4(ARM) with LTO all fails to load every kernel modules.
Do you have any idea why?
What's the error message in dmesg ?
Correction : it doesn't fails but it doesn't probes or do anything. lsmod tells me the modules are live, but dmesg does not show anything related to probing kernel modules.
It may be the compiler or the linker's fault.. I actually added some arflag because my compiled gcc-ar seems to be not loading liblto. https://bitbucket.org/arter97/zen-kernel/commits/c9ff16fedf8feed78cddadf562a5bc78bdce6439
Without this patch, linking fails with bunch of undefined references just like we are on normal GNU binutils instead of Linux's.
This is my binutils configure options : ./configure --prefix=/home/arter97/lto --enable-lto --disable-gold --enable-ld --enable-plugins --disable-werror
Weird. Merging linux-misc(from here) just breaks modules loading.
Even if I disable LTO_MENU. I'll dig a further and report back...