Porting Haiku to new toolchain

Is it possible to port Haiku to another toolchain such clang/lld? Currently jam passes GCC headers to compiler that are not compatible with Clang, code that use CPU intrinsics like system_time or arch_string.cpp fails to compile because Clang and GCC use different internal builtin functions.

I currently use CC=clang HAIKU_CC_x86_64=clang HAIKU_LD_x86_64=ld.lld ../configure --target-arch x86_64 to build Haiku with clang and I manage to build working StyledEdit with libbe.so and libtracker.so.

I managed to build haiku.hpkg with clang/lld including kernel. Building haiku_loader currently fails because division related functions are missing.


Yes, there’s a complicated situation around libgcc vs. compiler_rt. I made some hacks to make it work for now, but it’s incomplete. Please see me on IRC, or use the development mailing list; the forums are really not intended for technical discussions.

Why? I think that IRC is definitely not intended for technical discussions. It have no topic system, logs are hard to read, attachments not supported.

Clang should be able to use libgcc (it is a part of binary compatibility), only incompatible thing is headers from gcc_syslibs, it use internal compiler builtin inline functions that is different in Clang. Currently I just deleted GCC includes and replaced it with Clang ones. I don’t know where in Jam rules GCC includes from gcc_syslibs are added.

Almost the entirety of technical discussions like this, where we are just trying to determine what is happening, or what a good plan of attack is, take place on IRC. Some more sophisticated ones, and ones that require concensus among all developers take place on the mailing lists; but the forums are not for this, anyway.

I am not sure what you mean by “logs are hard to read”. They look like any other chat log. And they shouldn’t need to be read; the result of a discussion on IRC usually winds up in a commit, a commit message, or a longer discussion on a mailing list. It’s sort of supposed to be ephemeral.

Attachments are not supported inline, but we use http://0x0.st and the like for that (or if you use IRCCloud, it has a built-in pastebin/file attachment system.)

Again, this is just how we do things around here. If you do not want to use IRC, that’s alright I suppose, but please use the mailing lists and not the forums.

I think using the forum is fine, too. Why not? We have to live with our times. No one knows how to use IRC or a mailing list nowadays, but forums have a lower barrier of entry (I had a few GSoC students email me privately because they didn’t understand that you need to subscribe to a mailing list so you can send messages to it, for example).

IRC is indeed not that great. We can somehow patch around it with log bots, etc, but it isn’t great. It has the advantage of using open protocols, however, which I guess we’d like to keep. And of having a nice native client.


Disscussion history is important. People can become busy and take long pauses in activity, so reading history helps remember what was done and what is to be done. History may also contains important technical details like command line, error output etc. I ofter read my own posts for reference. It is also possible to search in forum history by builtin engine or Google, so it is easy to check did other people made progress in interesting topic.

1 Like

This is what the bug tracker and mailing lists are for; all commits should include descriptions of what is being solved and references to the tickets where more information is. Also, IRC logs are still searchable…

Again, we as a project do not use the forums for development discussion. Sometimes users talk about writing applications on here, and that’s OK; but development work we try to do on the bugtracker, mailing list, and IRC, not here.

Well, now it is!

Perhaps using Matrix could be considered as a future replacement for IRC then? Not sure if there’s a native client for it yet, but it does use open protocols, has more modern features, and can bridge between multiple other chat systems like IRC et al..

There is already a Matrix bridge for the IRC channels. We will probably not go further than that until there is a good native client for Haiku. But that’s off-topic here, I think, the main concern is forums vs. mailing list.

If I don’t remember wrong there use to be a gol to port Haiku to Clang and there was someone working on getting Haiku to build… But I see that x512 have some checking fixing some Clang things :slight_smile: