Configure terms
build: The machine GCC is built on.
host: The machine that GCC will be run on
target: The machine that the built GCC (on the host) will produce executables for.
native: build == host == target
cross: build == host, host != target
canadian: build != host, host != target, target != build
host-x-host / crossed native / cross-built native: host == target, build != target
The configure option --target=abc-def
creates executables whose names are prependes with abc-def
.
TODO
Link Time Optimazation (LTO)
lto-dump
is a tool for dumping LTO object files.
Intermediate languages
While GCC compiles a program, it represents the program with trhee interemediate languages: GENERIC, GIMPLE and RTL.
GENERIC
GENERIC provides way of representing entire function in trees. This representation is possible for all languages supported by GCC.
GIMPLE
GIMPLE is for optimization which (as GENERIC) is independent from the language being compiled.
GIMPLE is a three-address representation derived from GENERIC by breaking down GENERIC expressions into tuples of no more than 3 operands (with some exceptions like function calls).
GIMPLE has no control flow structures.
Expressions with side effects are only allowed on the right hand side of assignments.
The gimplifier converts GENERIC into GIMPLE.
A C-like representation of the GIMPLE form can be dumped with -fdump-tree-gimple
.
RTL (Register Transfer Language)
RTL is inspired by Lisp lists.
Plugins
A plugin extends the functionality of GCC.