Updated GCC/G++ for MorphOS?
  • Cocoon
    Cocoon
    Mequa
    Posts: 51 from 2012/3/30
    I tried the MorphOS SDK and found it only included an old version of GCC, version 2.95.3. Is there a newer version for MorphOS?

    I tried compiling my latest (at present console-only) C++ project (see final line) with MorphOS G++ and Make. It built with no warnings, but ran with some horrendous bugs not present when using newer versions of G++. Debugging it to work with 2.95.3 is going to be a pain!

    AROS has GCC 4.2.4, so why is MorphOS SDK stuck with ancient 2.95.3? :-?

    [ Edited by Mequa 14.05.2012 - 03:53 ]
  • »14.05.12 - 06:50
    Profile
  • MorphOS Developer
    Piru
    Posts: 404 from 2003/2/24
    From: finland, the l...
    MorphOS SDK includes gcc/c++ 4.4.5.

    If you wish to compile your particular project with gcc4 use this in makefile:
    CC=ppc-morphos-gcc-4
    CXX=ppc-morphos-c++-4
    CPP=ppc-morphos-cpp-4

    You can also use SDK:gccselect and SDK:gccselect4 to change the default compiler version if desired.

    Quote:

    AROS has GCC 4.2.4, so why is MorphOS SDK stuck with ancient 2.95.3?

    Surely AROS isn't stuck with ancient GCC 4.2.4? ;-)

    [ Edited by Piru 14.05.2012 - 06:31 ]
  • »14.05.12 - 07:17
    Profile
  • Cocoon
    Cocoon
    Mequa
    Posts: 51 from 2012/3/30
    That worked. I wonder why it defaults to the older GCC?

    Quote:

    Surely AROS isn't stuck with ancient GCC 4.2.4?


    Only for the older ABI apparently - I read the new one is up to GCC 4.6.2 already. 8-)
  • »14.05.12 - 12:07
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 1845 from 2003/3/5
    From: Poland
    Quote:

    That worked. I wonder why it defaults to the older GCC?


    Because 2.95.3 is that we consider a stable compiler - MorphOS itself is (for most part) compiled with it. Since the official programming language we endorse is C, there's no need for a different default.
  • »14.05.12 - 13:45
    Profile Visit Website