On 12 March 2015 at 08:51, Aram Hăvărneanu <aram.h@mgk.ro> wrote:
Plan 9 and Inferno have working 64-bit compilers.

Periodically I pull the Plan 9 and Inferno variants into line, so they should be about the same.
It's one reason I split off the Thumb implementation, although it handled ARM/Thumb interlinking better than some.
Looking at the current differences, I think I'm inclined now to keep a master copy and then pull
from that into the two distributions (could just pull directly for Inferno).
I've used it and lib9 in several other projects where other compilers
couldn't be used for licensing reasons, or because they were awful.
An ANSI cpp is included.

I believe there are small ANSI C libraries available.

It's trickier for Linux work. Not only is there ELF/DWARF to deal with, and
those are both families of a powerset of options, but
there are shared libraries and different run-time conventions.
Just look at the disaster of most implementations of variable length parameter lists:
thanks to function prototypes, which are now (what?) 30 years old,
we know where they are, and can make a simple array on the stack.
Instead some platforms, even otherwise tasteful ones,
for the caller not relying on the prototype, just in case you don't use them, 30 years on,
and instead using the complex register-oriented calling convention even for those,
and  use pages of complex filth to compensate.
(I wouldn't mind using registers a bit more in the calling convention, if it proved cost-effective,
but I'd still pass variable-length parameter lists on the stack.)

Most things need only a handful of system calls, but overall it looks like a big effort,
and I'm not sure what the goal would be. I have done wrapper programs that create
an environment to run Plan 9 a.out programs on Linux and another, but that was mainly
to assist compiler development on new platforms.