I’ve been reading that Haiku is getting close to self-hosting. Unfortunately “close” includes that there is no full set of development tools in the image yet. With Oliver Tappe’s GCC from BeBits and some fiddling I have managed to compile a Hello World app.
Is there any semi-official documentation on how to setup a GCC environment on Haiku?
To get my Hello World to compile I needed to rename/remove GCC’s stdio.h so that Haiku’s posix/stdio.h is used instead. However when trying to compile e.g. Perl I keep getting more and more header file errors…
No idea personally, however best bet would be to take a look at how the Beos R5 tool chain was setup
It’s good to see that compiling is now possible, although there’s probably still some memory issues to be resolved to build anything substantial right now.
Last I checked, the POSIX headers were definitely in need of improvement. I think I couldn’t even compile jam without using the R5 headers.
I think Axel specified that any posix header that is “broken” (I assume that means that it doesn’t at least provide as much functionality as R5) needs to have a Trac bug report filed so that it can be fixed.
To avoid miscommunications, I was referring to the files in /boot/develop/tools/gcc-2.95.3_binutils-2.17_rel-070218/lib/gcc-lib/2.95.3-beos-060710/include. The Haiku POSIX files I copied over to /boot/develop/headers/posix work fine for me so far.
By comparing the header files and renaming each file that exists in posix/ and does not depend on the corresponding GCC file I got Perl compiling half-way through. A BeOS section of Errno.pm.PL depends on cc so I symlinked it to gcc - had it compile through that way but it didn’t install due to a problem with Cwd, am rebuilding to check. If it works that’ll be another step towards Mono on Haiku.