Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
5e67d28c
Commit
5e67d28c
authored
Apr 22, 2015
by
Alexandre Duret-Lutz
Browse files
* HACKING: Update paragraph about LTO.
parent
de529df5
Changes
1
Hide whitespace changes
Inline
Side-by-side
HACKING
View file @
5e67d28c
...
@@ -171,30 +171,29 @@ This should create the directory html/.
...
@@ -171,30 +171,29 @@ This should create the directory html/.
Link-time optimizations
Link-time optimizations
-----------------------
-----------------------
This is currently (April 2011) tricky to setup, because the
This is currently a bit tricky to setup, because the toolchain is not
toolchain is not mature enough.
mature enough. However this is getting better and better. The Debian
packages we built nightly are mostly built with link-time optimization
(the shared library uses link-time optimization, but the command-line
binary are built without because of some bug with exception
propagation).
You need:
You need:
1. a version of GCC (>= 4.
5
) with gold and pluing linker enabled.
1. a version of GCC (>= 4.
9
) with gold and pluing linker enabled.
2. a version of Libtool that knows how to deal with
2. a version of Libtool that knows how to deal with
-flto flags (Libtool 2.4 will not work -- currently only
-flto flags (Libtool 2.4.2 will work)
the development version does.)
3. to use static libraries instead of shared libraries
so that you get inter-libraries optimizations.
Here are example options to pass to configure:
Here are example options to pass to configure to build a static
version with link-time optimization:
./configure CC=gcc-4.
6
CXX=g++-4.
6
\
./configure CC=gcc-4.
9
CXX=g++-4.
9
\
--disable-devel --disable-debug \
--disable-devel --disable-debug \
CFLAGS='-flto' CXXFLAGS='-flto' LDFLAGS='-fuse-linker-plugin' \
CFLAGS='-flto' CXXFLAGS='-flto' LDFLAGS='-fuse-linker-plugin' \
--disable-shared --enable-static
--disable-shared --enable-static
Using --disable-debug prevents the -g flag to be passed to the
If you want to build a shared library, see in debian/rules how it is
compiler, which seems to help avoiding some internal compiler errors.
done.
Some binaries (like ltl2tgba) currently fail to compile (internal
compiler error), while most others (like randtgba, dve2check, randltl,
...) do fine.
Log driver for testsuite
Log driver for testsuite
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment