[haiku-development] Re: hybrid questions -- not "how" to build, but why?

  • From: PulkoMandy <pulkomandy@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 28 Dec 2009 12:35:02 +0100

ASSUMPTION #1: gcc 2.95.3 is solely for people with old BeOS apps hanging
around

yes. It allows you to run old apps, and as an Haiku dev, to compare what you just did to the original by running the same app on both systems.


ASSUMPTION #2:  gcc 4 is almost ten years older then gcc 2, contains a
truckload of fixes and new stuff, and thus must be better than gcc 2 at many
things (remember, gross newbie assumptions here!)

It's 10 years _younger_ actually ;)
It provides better C99 compatibility and this is needed for a lot of today software (webkit, vlc, ...). Not necessarily because it make better code, but because people don't check their code against gcc2 anymore.

They are incompatible and cannot be mixed because of some internal changes in the way C++ is handled.

QUESTION #2: As a new developer to Haiku, with no old BeOS software hanging around on my shelves, should I want a hybrid build, or should I just build
with gcc4?

Usually gcc4 is fine. If you want to develop applications for Haiku, no problem. If you want to develop Haiku itself, you should still check your changes to see if they build fine in both compilers. But not all the devs do it (I don't ;))

QUESTION #3: What is the difference between the two hybrid flavours, GCC2/4
and GCC4/2?

In gcc2/4 the kernel is built with gcc2, while in gcc4/2 it uses gcc4. All the libs are available in both flavours.

QUESTION #4:  If the answer to question #2 is that I should use a hybrid,
how do I know if I should use GCC2/4 or GCC4/2?

It doesn't change much things. Follow what we did for the alpha (IIRC gcc4/2) as it's the official platform. But other work fine too.

Some additional notes :
This gcc2 vs gcc4 mess is relevant only for x86. On ARM, PPC, 68k and others, we don't provide BeOS compatibility and use only gcc4. I think it is not easily possible to build the gcc2 buildtools on a 64bit linux host, but maybe I missed something.


I spent a large part of tonight reading though several dozen past postings
to the mailing list as well as the wiki...and while I understand most of
what I'm reading, I'm still left wanting a clear and concise "getting
started" build guide.  I wont promise the moon, but I've documented what
I've learned up to now, and will summarize the answers to my questions for
future new Haiku developers here:
http://charette.no-ip.com:81/haiku/#Your_First_Hybrid_Build

In case you missed it, there is already some documentation on getting started, but it's not yet really complete :
http://www.haiku-os.org/guides
We'd be happy if you imporve of course :)

--
Adrien Destugues / PulkoMandy
http://pulkomandy.ath.cx

Other related posts: