Opened 7 years ago

Closed 7 years ago

#3569 closed enhancement (fixed)

LTO is broken with gcc-4.9.0 and binutils 2.24

Reported by: Miklos Karacsony Owned by: lfs-book@…
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)

binutils-2.24-load-gcc-lto-plugin-by-default.patch (2.0 KB ) - added by Miklos Karacsony 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Miklos Karacsony, 7 years ago

I almost forgot that:

export GCCSHORTVER="4.9.0"

comment:2 by bdubbs@…, 7 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 Miklos Karacsony, 7 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.

Last edited 7 years ago by Miklos Karacsony (previous) (diff)

comment:4 by bdubbs@…, 7 years ago

Resolution: fixed
Status: newclosed

Fixed at revision 10561.

Note: See TracTickets for help on using tickets.