Seems to work, for a couple simple programs anyway. The haiku build didn’t finish successfully, but it compiled most everything. I took the gcc spec from build/BuildConfig, and copied development files from the haiku and haiku_devel packages to make a working gcc --sysroot directory, and with that it compiles binaries that work on x86_64.
Building haiku was kind of a mess. First, jambase was out of date, so I was to update it. Well … current jam version is installed … let’s uninstall it and install it again. whoa, seems like lots of stuff coming with it. Reboot, and jam works.
Next, some script is failing with “mformat: command not found”, “mmd: …”, but no idea what or where. All I know is it happens right after what looks like a “dd”. Well … let’s try “jam -dx” to see what it’s actually running. whoa, lots of stuff now compiling. Who knows. Anyway mostly built.
The haiku build is able to cross-compile things out of its own files, so I suppose I could in theory have set up a gcc command to do that for general purpose, just couldn’t see how. So I copied the development environment I needed out of the haiku and haiku_devel packages, as mentioned above.