View previous topic :: View next topic |
Author |
Message |
Petross404 n00b
Joined: 27 Sep 2016 Posts: 55
|
Posted: Tue Aug 29, 2017 8:11 am Post subject: The correct way to enable LTO |
|
|
Hello there, I 've latelly experimenting with LTO. From what I 've read so far has to be present both at C(XX)FLAGS and LDFLAGS. But some people use it this way in the LDFLAGS: while others use it like this :
So which is the correct way? FFmpeg for example failes at configure because "compiler can not create executables" when the first option is used, while other ebuilds don't fail. |
|
Back to top |
|
|
fcl Tux's lil' helper
Joined: 31 Dec 2016 Posts: 77
|
Posted: Tue Aug 29, 2017 3:44 pm Post subject: |
|
|
I'm very interested in this. I have a very shallow understanding of the subject but to me LTO seems to be one of the next good things where Gentoo can shine compared to other distros. Stuff like this just needs to be well documented so more people will test it, hack it and enjoy it.
We really need a good LTO guide here in the forums and a comprehensive page over at wiki.gentoo.org. Sorry for sounding like a beggar but it's just my two cents |
|
Back to top |
|
|
NTU Apprentice
Joined: 17 Jul 2015 Posts: 187
|
Posted: Sun Sep 03, 2017 1:54 pm Post subject: |
|
|
CFLAGS+="-flto -fuse-linker-plugin"
LDFLAGS+="-flto -fuse-linker-plugin"
Use Gold linker instead of BFD. LTO the right way. Finally, that's settled. |
|
Back to top |
|
|
42n4 n00b
Joined: 10 Feb 2015 Posts: 9
|
|
Back to top |
|
|
|