Next: Submodel Options, Previous: Spec Files, Up: Invoking GCC
The usual way to run GCC is to run the executable called gcc, or <machine>-gcc when cross-compiling, or <machine>-gcc-<version> to run a version other than the one that was installed last. Sometimes this is inconvenient, so GCC provides options that will switch to another cross-compiler or version.
-b
machineThe value to use for machine is the same as was specified as the
machine type when configuring GCC as a cross-compiler. For
example, if a cross-compiler was configured with `configure
arm-elf', meaning to compile for an arm processor with elf binaries,
then you would specify -b arm-elf to run that cross compiler.
Because there are other options beginning with -b, the
configuration must contain a hyphen.
-V
versionThe -V and -b options work by running the <machine>-gcc-<version> executable, so there's no real reason to use them if you can just run that directly.