* [TUHS] Portable C Compiler Revived - Revived!
@ 2026-02-09 10:35 Arnold Robbins via TUHS
2026-02-10 7:00 ` [TUHS] " John Cowan via TUHS
0 siblings, 1 reply; 5+ messages in thread
From: Arnold Robbins via TUHS @ 2026-02-09 10:35 UTC (permalink / raw)
To: tuhs
Hi All.
To anyone who's interested, the revived version of the venerable
Portable C Compiler (PCC) is available on GitHub. See
https://github.com/PortableCC.
The original system hosting this project became unavailable (IIRC)
in October of 2023.
A while back Anders Magnusson put the whole history of PCC up on Github,
but at the time it had a number of bugs and I was not able to use it to
compile gawk. :-(
However, as of today, the various bugs that were blocking me
are fixed. So I thought I might mention it here on this list.
Enjoy,
Arnold
^ permalink raw reply [flat|nested] 5+ messages in thread
* [TUHS] Re: Portable C Compiler Revived - Revived!
2026-02-09 10:35 [TUHS] Portable C Compiler Revived - Revived! Arnold Robbins via TUHS
@ 2026-02-10 7:00 ` John Cowan via TUHS
2026-02-10 7:17 ` Arnold Robbins via TUHS
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: John Cowan via TUHS @ 2026-02-10 7:00 UTC (permalink / raw)
To: Aharon Robbins; +Cc: The Eunuchs Hysterical Society
>
> To anyone who's interested, the revived version of the venerable
> Portable C Compiler (PCC) is available on GitHub. See
> https://github.com/PortableCC.
>
There's some interesting things in there: the f77 and fcom compilers (but
not the i77 library); the "inc" (?) and "none" (bare metal) operating
systems; and the "m16c" (Mitsubishi), "nova" (Data General), "pdp7", and
"pdp10" architectures. There is also a separate compiler called "mip": I
don't know what that is.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [TUHS] Re: Portable C Compiler Revived - Revived!
2026-02-10 7:00 ` [TUHS] " John Cowan via TUHS
@ 2026-02-10 7:17 ` Arnold Robbins via TUHS
2026-02-10 7:35 ` Lars Brinkhoff via TUHS
2026-02-10 20:05 ` Clem Cole via TUHS
2 siblings, 0 replies; 5+ messages in thread
From: Arnold Robbins via TUHS @ 2026-02-10 7:17 UTC (permalink / raw)
To: cowan, arnold; +Cc: tuhs
John Cowan <cowan@ccil.org> wrote:
> >
> > To anyone who's interested, the revived version of the venerable
> > Portable C Compiler (PCC) is available on GitHub. See
> > https://github.com/PortableCC.
> >
>
> There's some interesting things in there: the f77 and fcom compilers (but
> not the i77 library); the "inc" (?) and "none" (bare metal) operating
> systems; and the "m16c" (Mitsubishi), "nova" (Data General), "pdp7", and
> "pdp10" architectures. There is also a separate compiler called "mip": I
> don't know what that is.
>
> >
I also want to be clear that this isn't my repository or code; it
belongs to Anders Magnusson. I just wanted to bring it to the
attention of the crowd here.
Arnold
^ permalink raw reply [flat|nested] 5+ messages in thread
* [TUHS] Re: Portable C Compiler Revived - Revived!
2026-02-10 7:00 ` [TUHS] " John Cowan via TUHS
2026-02-10 7:17 ` Arnold Robbins via TUHS
@ 2026-02-10 7:35 ` Lars Brinkhoff via TUHS
2026-02-10 20:05 ` Clem Cole via TUHS
2 siblings, 0 replies; 5+ messages in thread
From: Lars Brinkhoff via TUHS @ 2026-02-10 7:35 UTC (permalink / raw)
To: John Cowan via TUHS
John Cowan wrote:
>> https://github.com/PortableCC.
> There's some interesting things in there: [...]
> "pdp10" architectures.
This was briefly used by Magnusson attempting to port NetBSD to
the PDP-10.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [TUHS] Re: Portable C Compiler Revived - Revived!
2026-02-10 7:00 ` [TUHS] " John Cowan via TUHS
2026-02-10 7:17 ` Arnold Robbins via TUHS
2026-02-10 7:35 ` Lars Brinkhoff via TUHS
@ 2026-02-10 20:05 ` Clem Cole via TUHS
2 siblings, 0 replies; 5+ messages in thread
From: Clem Cole via TUHS @ 2026-02-10 20:05 UTC (permalink / raw)
To: The Unix Historical Society
below. As Arnold says, the repository is Anders Magnusson, and Arnold was
just saying that he was able to get that compiler to compile awk. At his
suggestion, I reached out to Anders for clarification (and CC'ed Arnold).
Much of our interface is below.
On Tue, Feb 10, 2026 at 2:01 AM John Cowan via TUHS <tuhs@tuhs.org> wrote:
> There's some interesting things in there: the f77 and fcom compilers (but
> not the i77 library);
Yes, that would need to be added as a minimum if this were to
be targeted for real work. I did not poke at it too far, but given that it
is missing i77, I suspect the ANSI suite would return a number of issues.
Moreover, the UCB 4.X release of F77 was never particularly strong (and
could not pass it either).
> the "inc" (?) and "none" (bare metal) operating
> systems; and the "m16c" (Mitsubishi), "nova" (Data General), "pdp7", and
> "pdp10" architectures.
Yes, he was extremely prolific but .. there are some missing pieces. WRT
to the pdp10 target, it would be interesting how compairs the one in Panda
(TOPS-20) distribution, which is used to prove a "UNIX-Like" (sort of) set
of commands for TOPS-20.
> There is also a separate compiler called "mip": I don't know what that is.
>
The mip directory in the original PCC suite is the "Machine Independent
Pieces" and is common to all target ISAs and OSs (which are primarily
UNIX-based).
My Question to Anders in blue/ his response in orange:
1.) So, the first core question I have is, what is the provenance of your
code base? Is it based on one of the original PCC threads (V7 or V32)
directly, or modified by UCB (or someone else), or any of this code based
on the later PCC2?
The original 32V code. I fetched it when Caldera released it around 25
years ago. The BSD improvements was not released publically then.
I had a wiki up until a few years ago about this (until the machine running
it broke down). Quite trivial but with some useful information. Haven't
spent any time to set it up again. Available using webarchive:
https://web.archive.org/web/20230819230148/http://pcc.ludd.ltu.se/
2.) Looking at the man page source, am I correct in believing the C
front-end supports C99?
True. I have over the last 25 years done quite some improvements, also in
the backend.
3.) You have a directory called cxxcom and seem to build a binary of that
name, but no man page. Looking at some of the files, such as cgram.y It
looks to me like you are declaring C++ tokens also? So I'm thinking this
is a C++ implementation. If so, does it try to follow any of the C++
standards (which ones)?
:-) This was something I did quite some time ago (around 20 years ago)
(because I had some free time). It is not working; and is very
rudimentary. It passed "Hello World", but not much more than that. I
checked it in so that it shouldn't get lost if someone wants to rescurrect
it.
4.) You have a bunch of backends besides PDP-11 and VAX. You clearly wrote
many of these, which is impressive. Did the PDP-11 and Vax start from the
original Johnson (PDP-11) and Riesner (Vax) code bases? Did any of the
others come from elsewhere (such as the set released by Steve Ward's RTS
group at MIT)?
The VAX was from 32V. The PDP11 backend was written by me, and as far as I
remember, there is no other backend coming from any other sources (mostly
due to licensing issues).
5.) The compilers generate assembler mnemonic as did the originals. Given
the wide range of architectures and OS targets, the question arises: which
assemblers and linkers does each target support, and is there a repository
for them?
Well, no. The output is for the OS (or SDK) which it has been ported to. It
is usually expected to run in a Unix environment.
Also note that many of the (more obscure) backends are not complete; for
example Nova do not support any floating point.
6.) It was unclear to me if these compilers could easily be built as
cross-compilers.
Yes, most of them can. It uses the normal configure, so just specify a
different target.
I have broken out the floating point stuff so targets like vax/pdp11 easily
should be able to cross-compile.
A small idea/request. It would be helpful if you had a text file called
READ_ME with notes like my questions and maybe a few more details WRT to
each, plus any hints on how to build them. I also think it would be
helpful to include a short description of the provenance. Since I think
these are based on either V7/V32 PCC, it might be wise to consider placing
a copy of the Caldera license [
https://www.tuhs.org/Archive/Caldera-license.pdf] at the top level of your
tree.
I think the questions you asked are answered on the (archived) web site.
Maybe add a link to it somewhere?
The caldera license is added to each file (as is common), but having
license information about the project might be a good idea as well.
...I am not really up-to-speed with using git/github, so feel free to
provide improvements that way :-)
I'm trying to learn (in the little time I have left hacking - daytime job
takes quite some time for me).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-02-10 20:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-09 10:35 [TUHS] Portable C Compiler Revived - Revived! Arnold Robbins via TUHS
2026-02-10 7:00 ` [TUHS] " John Cowan via TUHS
2026-02-10 7:17 ` Arnold Robbins via TUHS
2026-02-10 7:35 ` Lars Brinkhoff via TUHS
2026-02-10 20:05 ` Clem Cole via TUHS
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).