After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 741140 - [PATCH] build: add --enable-lto to enable Link Time Optimization
[PATCH] build: add --enable-lto to enable Link Time Optimization
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-12-05 00:57 UTC by Dan Williams
Modified: 2015-01-12 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-build-add-enable-lto-to-enable-Link-Time-Optimizatio.patch (1.37 KB, text/x-c++)
2014-12-05 00:57 UTC, Dan Williams
Details

Description Dan Williams 2014-12-05 00:57:18 UTC
Created attachment 292163 [details]
0001-build-add-enable-lto-to-enable-Link-Time-Optimizatio.patch

Takes about 3x as long to build with gcc 4.8, but gcc 4.9
is supposed to speed that up considerably.

Name           Before   After   Saved
-------------------------------------
NetworkManager  1734744  1689728   3%
libnm           1263536   808816  36%
nm-iface-helper  931136   906496   3%
libnm-util       441264   437168   1%
libnm-glib       297064   292960   2%

I re-tested the libnm stats twice, I really don't know why it saves so much.
Comment 1 Thomas Haller 2014-12-05 13:20:20 UTC
Looks good.

Compiles with clang (on F20), but linking fails.
Comment 2 Dan Williams 2014-12-08 16:16:13 UTC
(In reply to comment #1)
> Looks good.
> 
> Compiles with clang (on F20), but linking fails.

Yeah, which is why I made it an option :)  Plus GCC < 4.8 shouldn't use it either.
Comment 3 Dan Williams 2014-12-11 15:22:13 UTC
pushed as 67bf5cb1a34c7dcb4081254a859bf82421be1d48