Differences between revisions 3 and 4
Revision 3 as of 2016-08-26 19:15:10
Size: 446
Editor: SamatJain
Comment:
Revision 4 as of 2016-09-09 08:11:48
Size: 695
Editor: SamatJain
Comment:
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
== Compiling gcc ==

Download gcc tarball, run `contrib/download_prerequisites` script to download external libraries to build as part of gcc.

./configure --prefix=/opt/gcc-custom --disable-multilib --disable-libada --enable-languages=c,c++

Using profile-guided optimization (PGO)

gcc -O3 -march=native -pg -fprofile-generate ...
# Run a benchmark or program's typical load
gcc -O3 -march=native -fprofile-use ...

Check compiler preprocessor defines

# E.g. check for the version of OpenMP supported
echo | cpp -fopenmp -dM | grep -i open
#define _OPENMP 200805

Compiling gcc

Download gcc tarball, run contrib/download_prerequisites script to download external libraries to build as part of gcc.

./configure --prefix=/opt/gcc-custom --disable-multilib --disable-libada --enable-languages=c,c++


CategoryCheatSheet

SamatsWiki: CheatSheet/Gcc (last edited 2020-05-09 00:20:51 by SamatJain)