Gentoo Archives: gentoo-dev

From: Ryan Hill <rhill@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] LTO use in the tree
Date: Mon, 21 Apr 2014 03:15:35
Message-Id: 20140420211451.2d0fc6a0@caribou.gateway.pace.com
1 Hey all,
2
3 As more and more packages are starting to add LTO flags automatically through
4 their build systems, I thought I'd point out a couple things:
5
6 - LTO utterly destroys debug info. Flags like -g are incompatible with LTO.
7
8 - LTO causes .GCC.command.line sections to be discarded, which means your
9 package will always be QA flagged as ignoring CFLAGS.
10
11 - LTO takes a _lot_ of memory. That memory is required on the host arch.
12 Distcc doesn't help things here, because linking happens locally. Consider
13 all the archs your package is built on, and if they all routinely have
14 multiple GBs of memory installed.
15
16 - LTO in 4.7 is still fairly buggy. There are no plans to fix it. 4.8 is
17 better, but 4.9 moves to a different model, so bugs in 4.8 probably won't be
18 fixed, especially regarding memory usage.
19
20 - I'm happy to backport patches to fix LTO problems if they're available, but
21 you'll generally have to do the legwork. And like I said, most aren't going
22 to be backportable.
23
24 Please take these things into consideration when deciding whether or not this
25 feature is worth it.
26
27 Thanks.
28
29
30 --
31 Ryan Hill psn: dirtyepic_sk
32 gcc-porting/toolchain/wxwidgets @ gentoo.org
33
34 47C3 6D62 4864 0E49 8E9E 7F92 ED38 BD49 957A 8463

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-dev] Re: LTO use in the tree Ryan Hill <rhill@g.o>
Re: [gentoo-dev] LTO use in the tree "Michał Górny" <mgorny@g.o>