Improve the build system for building on Haiku
|Reported by:||mmadia||Owned by:||mmadia|
|Has a Patch:||no||Platform:||All|
[Currently] the build on Haiku will break whenever certain kinds changes in Haiku happen. The main reason for that is that, when building on Haiku, the build system tools are build against the build platform headers and libraries, but against the current headers and libraries on Linux, FreeBSD, and friends.
The theoretically simple solution is to use the latter method on Haiku as well. That, however, leads to clashes with the build platform headers and libraries, which at some point have to be used. The solution to that is to wrap all functionality used and symbolically map the wrappers to the names of the expected functionality (via macros, the FS shell uses a very similar approach). Essentially this cleanly separates the Haiku build environment from the build platform environment, from which the build on other platform benefits as well, as it allows to get rid of several hacks and work-arounds and also allows for dealing more easily with build platform quirks (like missing POSIX functionality, which is currently an issue on MacOS X).
As [Ingo] wrote before, this is a lot of tedious work, since wrappers for dozens of POSIX and Haiku headers and their functionality need to be written.