I had hoped to explore LTO (Link Time Optimization : it is intended
to make smaller builds, at the cost of longer compiles) in my
'tuning' experiments, but that mostly isn't going to happen (still
some more ŧ's to cross and ı's to dot, but the packages are becoming
increasingly old). However, three packages claim to offer LTO in
their configure scripts: Python2, Python3, and LibreOffice.
For Python2, I can't see the point - I might still have to build it
so that I can compile graphical browsers, gimp, inkscape, some of
TeXLive, but hopefully its days are numbered.
LibreOffice seems good, the option --enable-lto causes (on an
8-core machine) the options:
-flto=8 -fuse-linker-plugin
which seem sensible. I've no comment on _how_much_ extra time this
takes (in my own builds, with many languages enabled in help files
and dictionaries, the overhead is not catastrophic, but on a
minimal-language 4-core build it might add quite a lot.
Anyway, the installed files _are_ smaller, so all seems good.
For Python3, --with-lto adds the options:
-flto -fuse-linker-plugin -ffat-lto-objects
which adds some time to the compile, but for no obvious benefit -
/usr/lib/libpython3.7m.so.1.0 is marginally bigger,
/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a
is a lot bigger (+25 MB) although the time overhead is small.
Conversely, Python's --enable-optimizations (described as enabling
expensive optimizations) uses more space, and more than 20 SBU extra
time (it is single threaded, building tests for PGO and then running
them) but it is slightly beneficial for heavy users of Python (e.g.
the kernel's make -j8 pdfdocs uses mostly Sphinx, which is Python,
with 10-13 seconds of XeLaTeX, and saves around 10 seconds).
So, I am minded to mention both options for Python3 in Command
Explanations (with notes that lto takes extra time and space for no
obvious gain, whiles expensive optimizations are very slow to
build), and to mention lto in libreoffice as "This enables Link Time
Optimization, which means the build takes longer but installs
smaller binaries."
Speak now, or forever hold your piece ;-) [1]
Bruce mentioned about adding something on optimizations when I had
finished - still need to complete more runtime tests, then restore a
previous build (using -O2 instead of -O3 for gcc turned out to be a
bad idea!) before rebuilding some other things with -O2 to see if
-O3, which extended the compile times, was at all beneficial.
ĸen
[1] As in a jeely piece, or jam sandwich.
--
>
One pill makes you larger, And one pill makes you small.
And the ones that mother gives you, Don't do anything at all.
Go ask Alice, When she's ten feet tall.
-- Jefferson Airplane, White Rabbit
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page