IT lexicon › Programming › gcc2 hybrid (Haiku)

gcc2 hybrid (Haiku)

Programming På svenska → Updated: 2026-11-09

How Haiku runs BeOS programs from 2000 on 32-bit x86: the base system is built with a compiler from the previous millennium, and a modern GCC runs alongside.

BeOS R5 was compiled with GCC 2.95, and from GCC 3 onwards C++ changed both its name mangling and its ABI. A system built with a modern compiler therefore can't load an old BeOS library — the symbol names don't even match. Haiku's answer was to build its own libraries twice. The primary architecture is gcc2, binary-compatible with BeOS; the secondary one, built with modern GCC, is installed in parallel so that new programs using C++11 and later can run side by side.

Packages are tagged with their architecture and the toolchain picks the right libraries per program. It is exactly as fiddly as it sounds. The 64-bit version of Haiku has no BeOS compatibility to worry about and uses modern GCC only.

← Back to the lexicon