Haiku Finally Gets a Native GCC4 - full story inside!

News posted on Sun, 2009-02-01 04:25

Michael Lotz details the process he used

To demonstrate what process was necessary to perform this task, he has written a detailed blog post recounting his experience. It's a long read, and certainly lists some confusing concepts. If you were at all curious what it would take, going from a GCC2-built Haiku to a GCC4-built Haiku with its own native compiler, the steps are all there.

During the process, Michael was even "fortunate" to find and submit a patch for a bug in libiberty. You will read about the strange behavior that led to the discovery in his blog post.

Dogfooding is important... Yummy!

If you're paying attention while reading his blog, you'll note that Michael is "dogfooding" during his Haiku development. Not only does he use Haiku for development purposes, but it's also the only operating system he uses currently. This suggests a couple of important points: a) Haiku is stable enough to use daily and develop in and b) Haiku developers are serious about Haiku, intending to use it as their daily OS. I know of several developers who use Haiku daily for various tasks, including development. This demonstrates a dedication to the quality they are pursuing, and increases the likelihood that even little annoying things about Haiku are going to get fixed eventually.

What does all this mean? What's next?

Freshly-built Haiku running GCC4Freshly-built Haiku running GCC4

So, what should we expect from Haiku now that it has a native GCC4 toolchain?

I'm not sure - and that's the exciting part actually! This opens the door for easier porting of modern software, and more easily moves Haiku out of the "dark" GCC2 cloud that BeOS had lived under.

Several existing Haiku porting projects already require GCC4 to proceed and/or update to latest versions: Firefox 3, Webkit, VLC, and more.

Haiku already supports a "hybrid" environment where it is built with GCC2 for backward compatibility but also providing GCC4 libraries for future software support - or even more interesting: a GCC4-built Haiku with GCC2 libraries for backward compatibility. I think we'll see the latter becoming more common now with the availability of a native GCC4.

There are still some minor loose ends to tie up - such as providing the remaining development tools for a GCC4 Haiku (the GCC2-built ones will work, but they are not yet automatically installed with the "Development" optional package). Additionally, those who wish to build a GCC4 Haiku from within an existing GCC2-built Haiku might find it a little bit challenging. If you'd like to experiment, you may want to compile your own GCC4 Haiku from Linux, BSD, etc., or even wait for the availability of pre-built GCC4 images to appear.

These are very interesting developments, I hope you're as excited as I am at what the future holds :)


News