Symbian
Symbian OS Library

FAQ-1026 Can I use a latest version of GCC like 3.x and beyond for Symbian OS development?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Tools
Created: 04/05/2004 Modified: 10/17/2005
Number: FAQ-1026
Platform: Symbian OS v6.0, Symbian OS v6.1, Symbian OS v7.0, Symbian OS v7.0s, Symbian OS v8.0, Symbian OS v8.0a, Not Applicable

Question:
I'm porting some code from standard C++ to Symbian OS and I'm using the newer GCC 3.x, which has some really good optimisation options. Can I use this for Symbian OS ?



Answer:
Note: This FAQ only applies to Symbian OS pre-v9. Symbian has introduced the GCC-E compiler support in Symbian OS v9+. See FAQ-1293 for more details.

    The short answer is 'No' - you can't use any GCC version beyond 2.9.


    There are many reasons for this - changes like name mangling of C++ signatures, binary compatibility etc.

    Now, the reasons why Symbian chose not to use anything other than -o0 is because  that GCC 2.9x wouldn't handle some ARM optimisations very well, in many cases. Moreover, -o0 doesn't mean it is less optimised than -o2 for example; the 1-2-3 switches denote different kinds of optimisation (one is for speed, the other is for space, etc.)

    Maybe if you really want to optimise some functions, you could compile them to assembler source first. In particular for number-crunching function that you may have written, you should consider compiling the source to assembler first and optimize by hand the few critical paths to gain the improvements you require.