This is an effort to establish the optimal GCC command options for cross-compiling for the Pandora on another computer. All contributions are welcome!
This should be seen as a sane starting point, but not prevent anyone from experimenting and posting their experience here.
Note that there may well be options which may have to be set depending on the characteristics of the application to be compiled.
You should also read the replies in this thread, they contain interesting information.
These are options specific to the HW and SW of the Pandora and (theoretically) should invariably produce the best results:
arm-none-linux-gnueabi-g++ \ -pipe \ -march=armv7-a \ -mcpu=cortex-a8 \ -mtune=cortex-a8 \ -mfpu=neon \ ...
These are some good optimization options to try:
-O2 \ # standard optimizations, should always be a safe bet, you may also want to try -O3 -fno-exceptions \ # if it does not cause errors, USE IT: omits support for C++ try/catch exception handling [thanks to foxblock] -fno-rtti \ # if it does not cause errors, USE IT: omits support for RTTI (Run-Time Type Information) [thanks to foxblock] ...
Originally this post was only for the free Sourcery toolchain by Mentor Graphics. But I have learned that Sourcery is essentially GCC.
Mentor Graphics thankfully also offers the documentation for the toolchain for download.
Chapter 3.17.2 ARM Options in the compiler manual (PDF) seems like a good start for relevant options.