From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <201503112030.t2BKU71p008530@skeeve.com> Date: Thu, 12 Mar 2015 10:06:19 +0000 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=047d7bfd027a0a66cc0511148929 Subject: Re: [9fans] ken cc for linux Topicbox-Message-UUID: 4948ed1c-ead9-11e9-9d60-3106f5b1d025 --047d7bfd027a0a66cc0511148929 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12 March 2015 at 08:51, Aram H=C4=83v=C4=83rneanu 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. --047d7bfd027a0a66cc0511148929 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

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

Periodically I pull the Plan 9 and Inferno var= iants 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 t= o keep a master copy and then pull
from tha= t into the two distributions (could just pull directly for Inferno).
<= div class=3D"gmail_extra">I've used it and lib9 in several other projec= ts where other compilers
couldn't b= e used for licensing reasons, or because they were awful.
An ANSI cpp is included.
<= br>
I believe there are small ANSI C librar= ies available.

It's trickier for Linux work. Not only is there ELF/DWARF to d= eal with, and
those are both families of a = powerset of options, but
there are shared l= ibraries and different run-time conventions.
Just look at the disaster of most implementations of variable length para= meter lists:
thanks to function prototypes,= which are now (what?) 30 years old,
we kno= w 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, ju= st in case you don't use them, 30 years on,
and instead using the complex register-oriented calling convention eve= n for those,
and =C2=A0use pages of complex= filth to compensate.
(I wouldn't mind = using registers a bit more in the calling convention, if it proved cost-eff= ective,
but I'd still pass variable-len= gth parameter lists on the stack.)

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

--047d7bfd027a0a66cc0511148929--