Resurrecting this thread, because I think Korli’s work is the most recent work on porting Go?
I was able to use Korli’s code to cross-compile Go 1.18 for Haiku today (from macOS 10.13 High Sierra running Go 1.20). The resulting Go compiler really can compile working Haiku programs, but I have to recompile several times to get through the fork/exec bugs in the compiler. Also networking doesn’t work, but at least I can compile programs with networking code, which is more than I can with Go 1.4.
Some errors seems spurious - one compile error while compiling my own Go programs claimed this when it encountered a call to os.Hostname():
cannot find package internal/syscall/execenv (using -importcfg)
But compiling my program again, it was suddenly fine! Another error along the way was:
go build internal/reflectlite: mkdir: errno 2147483653
And most errors were of the form:
go build [packagename]: [path-to-compile-or-asm] fork/exec [path-to-compile-or-asm] errno 2147483653
Does anyone know what “errno 2147483653” is? My guess is it’s meant to be a negative error code and should actually be “errno -6”, but I still don’t know what that means.
I’d need networking to work in Go before I can actually get work done with this. My Go programs mostly call out to SFTP servers. But this seems like it’s actually really far along!
Also, pictures or it didn’t happen, so…