Re: Using LTO for Fedora package builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, 2018-02-25 at 12:30 +0000, Zbigniew Jędrzejewski-Szmek wrote:
> On Sun, Feb 25, 2018 at 01:19:24PM +0100, Florian Weimer wrote:
> > On 02/25/2018 12:45 PM, Zbigniew Jędrzejewski-Szmek wrote:
> > > > What's our current take on using LTO for Fedora package builds?
> > > systemd would like to use it.
> > 
> > Why?  What are the benefits?
> 
> There's a small change in size. When I tested recently it was ~7%,
> but
> it was higher in the past. Fedora builds usually enable almost all
> optional
> code, but if some parts are disabled (which happens also in RHEL), I
> think
> the gains are bigger.

(you probably are aware, sorry for saying something trivial).

But we like to build NetworkManager with

  -fdata-sections -ffunction-sections -Wl,--gc-sections

and let the linker figure out which static functions can be removed.
(we have unused static functions, because we build a static library
that is used by several binaries).
(you also need a linker script to hide static functions so that the
linker recognizes them as unused).

With this, the binary size savings are considerable and similar to what
we'd get with LTO.



For NetworkManager we don't use LTO because it results in missing
symbols (at least, that was the case about a year ago).
https://bugzilla.gnome.org/show_bug.cgi?id=782525


best,
Thomas

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux