The default gprbuild configuration supports version 4.9 of all
compilers provided by the GCC suite. This ensures that projects mixing
objects compiled from many languages will share the same ABI.
* Gprbuild relies on a configuration file listing all available
compilers (auto.cgpr is used by default). You may create such a
file with the gprconfig tool, but if you don't gprbuild will run
"gprconfig -o auto.cgpr" by itself (transmitting --db options).
* Gprconfig relies on a configuration directory listing all known
compilers (/usr/share/gprconfig is used by default). You may provide
your own modified copy with the --db options.
If you need to use a different version of a compiler, say gcc-4.6:
cp -r /usr/share/gprconfig yourdb
in yourdb/compilers.xml, in the GCC stanza,
replace "gcc" with "gcc-4.6" in line
and in line ${PREFIX}gcc -dumpmachine
replace the ... bloc with 4.6
in yourdb/c.xml, in the stanza containing
both a line
and a line for Driver ("C") use "${PATH(c)}${PREFIX(c)}gcc";
replace "gcc" with "gcc-4.6" in the Driver line above.
gprconfig --db- --db yourdb (generates default.gpr that you may check)
gprbuild yourproject.gpr (using default.gpr)
-- Nicolas Boulenguez , Sat, 8 Nov 2014 15:55:39 +0100