* HACKING (command): Some notes about link-time optimizations.
This commit is contained in:
parent
30f00584d4
commit
050ea69f47
2 changed files with 32 additions and 0 deletions
|
|
@ -1,3 +1,7 @@
|
|||
2011-04-03 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||
|
||||
* HACKING (command): Some notes about link-time optimizations.
|
||||
|
||||
2011-04-03 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||
|
||||
* configure.ac: Pass CXXFLAGS/CFLAGS/CPPFLAGS debug/optimization
|
||||
|
|
|
|||
28
HACKING
28
HACKING
|
|
@ -114,6 +114,34 @@ Finally generate a coverage report in HTML:
|
|||
This should create the directory html/.
|
||||
|
||||
|
||||
Link-time optimizations
|
||||
-----------------------
|
||||
|
||||
This is currently (April 2011) tricky to setup, because the
|
||||
toolchain is not mature enough.
|
||||
|
||||
You need:
|
||||
1) a version of GCC with gold and pluing linker enabled.
|
||||
2) a version of Libtool that knows how to deal with
|
||||
-flto flags (Libtool 2.4 will not work -- currently only
|
||||
the development version does.)
|
||||
3) use static libraries instead of shared libraries.
|
||||
|
||||
Here are example options to pass to configure:
|
||||
|
||||
./configure CC=gcc-4.6 CXX=g++-4.6 \
|
||||
--disable-devel --disable-debug \
|
||||
CFLAGS='-flto' CXXFLAGS='-flto' LDFLAGS='-fuse-linker-plugin' \
|
||||
--disable-shared --enable-static
|
||||
|
||||
Using --disable-debug prevents the '-g' flag to be passed to the
|
||||
compiler, which seems to help avoiding some internal compiler errors.
|
||||
|
||||
Some binaries (like ltl2tgba) currently fail to compile (internal
|
||||
compiler error), while most others (like randtgba, dve2check, randltl,
|
||||
...) do fine.
|
||||
|
||||
|
||||
Coding conventions:
|
||||
===================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue