[haiku] Re: GCC2 vs GCC4?

  • From: Roland Plüss <roland@xxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Tue, 15 Sep 2009 22:33:29 +0200


Niels Reedijk wrote:
> Hi,
>
> 2009/9/15 Ankur Sethi <get.me.ankur@xxxxxxxxx>:
>   
>> The GCC folks used to break binary compatibility between major GCC
>> versions. A binary compiled using GCC2 won't work on a GCC4 system,
>> and one compiled with GCC4 won't work on a GCC2 system. Most old BeOS
>> software is in the form of GCC2 binaries, hence Haiku R1A1 was
>> released as a GCC2/4 hybrid.
>>
>> If you need to compile modern software (WebKit etc.), you need GCC4.
>> GCC2 support will probably be dropped after R1 Final comes out. I'd
>> say for the long term, use GCC4 (if you wish your app to be
>> Haiku-only). If you need your app to work with BeOS, use GCC2.
>>     
>
> I think this is an incorrect assumption. The image has been released
> as a hybrid as to allow software like WebKit to be able to work on
> Haiku. However, we haven't made any promises regarding the binary
> compatibility of the GCC 4 libraries. This means that any software
> compiled for GCC 4 might not work on later Haiku versions. The GCC 2
> compiled applications are guaranteed to work all through R1, and I
> believe there are voices to try to support them for future version(s)
> as well.
>
> I believe the wise thing for you to do is to compile your software
> with GCC 2 if you can, and only use GCC 4 if you have to. Both apps
> will work on the current alpha image, but only the GCC 2 is absolutely
> guaranteed to continue working through R1's lifetime.
>
> Kind regards,
>
> Niels
>
>   
I prefer to use GCC4 since it simply creates better binaries. Besides
the GCC2 failed to compile my stuff but this had been due to autotools
breaking the compilation with a wrong compilation flag combo. Not sure
though what caused it but I simply recompiled using GCC4 and it worked.
In general my code should work on older GCC but this one project still
uses autotools instead of scons like the other projects use. I'll see if
I can switch this old project to SCons any time soon than this
GCC2/autotools problem should vanish.

-- 
Yours sincerely
Plüss Roland

Leader and Head Programmer
- Game: Epsylon ( http://epsylon.rptd.ch/ ,
http://www.moddb.com/games/4057/epsylon )
- Game Engine: Drag(en)gine ( http://dragengine.rptd.ch ,
http://www.moddb.com/engines/9/dragengine )
- Normal Map Generator: DENormGen ( http://epsylon.rptd.ch/denormgen.php )

Other related posts: