GCC Hybrids
With Changeset 25536, it became possible to build Haiku as a GCC Hybrid. In such a case, Haiku will be capable of running binaries that are compiled with either GCC 2.95 or GCC 4.x. As of Changeset 30875, it became possible to use a GCC Hybrid to compile objects for either GCC.
In a GCC Hybrid, there is the main GCC and the alternative GCC. The main GCC is the version that was used to compile Haiku. The alternative GCC provides both a runtime time environment and a cross-compiler for using and creating other-GCC objects.
Since x86 is the only platform for which BeOS R5 binary compatibility is possible, no other target platforms need to be built with gcc2. Thus, x86 is the only platform that a GCC Hybrid is usable.
The following directions are for cross compiling Haiku from another OS. If you wish to make a GCC Hybrid from within Haiku, read this mailing list post, How to build Haiku R1/Alpha 1
GCC 2.95 with GCC 4.x as secondary libraries
Also referred to as x86gcc2hybrid:
cd /path/haiku/haiku/ mkdir generated.x86gcc4 mkdir generated.x86gcc2hybrid cd generated.x86gcc4 ../configure --build-cross-tools-gcc4 x86 ../../buildtools/ cd ../generated.x86gcc2hybrid ../configure --build-cross-tools ../../buildtools/ --alternative-gcc-output-dir ../generated.x86gcc4/ jam <options>
GCC 4.x with GCC 2.95 as secondary libraries
Also referred to as x86gcc4hybrid:
cd /path/haiku/haiku/ mkdir generated.x86gcc2 mkdir generated.x86gcc4hybrid cd generated.x86gcc2 ../configure --build-cross-tools ../../buildtools/ cd ../generated.x86gcc4hybrid ../configure --build-cross-tools-gcc4 x86 ../../buildtools/ --alternative-gcc-output-dir ../generated.x86gcc2/ jam <options>
