Sourcery G++ Lite for ELF and GNU/Linux targets includes a compiler wrapper that enables you to select the Power target via a command-line argument instead of by invoking a different compiler executable.
Using the compiler wrapper from the command line is similar to using the compiler. Instead of:
> powerpc-linux-gnu-gcc arguments...you can use the command:
> powerpc-unified-gcc --target=powerpc-linux-gnu arguments...
If you also have Sourcery G++ for Power
ELF
installed, you can use the wrapper to compile for that target by
specifying the corresponding --target option:
> powerpc-unified-gcc --target=powerpc-elf arguments...
Note that the directory where
powerpc-elf-gcc
is installed must be present in your PATH
environment variable. You can use the command:
> powerpc-unified-gcc --help
to
determine what the supported values for
the --target option are.
Please refer to Chapter 4, “Using Sourcery G++ from the Command Line” for more information on building applications with Sourcery G++.