Using what you have posted @korli, I was also able to cross-compile from macOS to bootstrap a go 1.18.2 toolchain for Haiku and it does indeed cross-compile a working executable in Haiku which is more further than we have gotten with porting Go. I believe this is the latest version of the complier we have working right now. Nice work @korli!
I haven’t tried yet but I guess that attempting to compile some go code would result in errors due to the fork/exec issues @korli already mentioned.