Opened 11 years ago
Closed 11 years ago
#3569 closed enhancement (fixed)
LTO is broken with gcc-4.9.0 and binutils 2.24
Reported by: | Miklos Karacsony | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.6 |
Component: | Book | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description
I have a suggestion to fix this issue. Build binutils with the attached patch which will force binutils to load the gcc lto plugin from /usr/lib/bfd-plugins. And finally create a symlink:
install -dm644 /usr/lib/bfd-plugins ln -sfv "/usr/lib/gcc/x86_64-unknown-linux-gnu/${GCCSHORTVER}/liblto_plugin.so.0.0.0" /usr/lib/bfd-plugins/
I know that an LTO-enabled gcc is not part of the book yet, but please consider adding these instructions to it.
Attachments (1)
Change History (5)
by , 11 years ago
Attachment: | binutils-2.24-load-gcc-lto-plugin-by-default.patch added |
---|
comment:1 by , 11 years ago
comment:2 by , 11 years ago
It's unclear to me where this should be applied. Applying to binutils in Chapter 6 is after glibc, zlib, and file, although the only significant program here is glibc.
comment:3 by , 11 years ago
The patch should be applied in chapter 6 to binutils, and the symlink needs to be created after chapter 6 gcc is installed. After that you can use LTO with the new gcc. I haven't tried it on the temporary tools, but it should work with a minimal modification. However, I think it is pointless, since you cannot build glibc with LTO.
I almost forgot that: