[TUHS] Plan 9 C compilers for Linux/mac/windows

Jacob Moody via TUHS tuhs at tuhs.org
Sat Sep 5 03:02:19 AEST 2026


One thing to note, this starts from an older fork and some perusing through
the git commit log I don't see any backports of a lot of the fixes that were
found and fixed in the 9front variants of these compilers. I could also
be wrong exactly what is taken from the old kencc-fork repo and what is
taken from go is not super clear and I have little interest to review AI code.

There were some pretty nasty latent bugs that only tend to show up once you
start to tow these compilers outside their environment. I found a decent chunk
of bugs only once we started porting some games (I talk about some in my iwp9 talk
on NPE). My favorite was how a packed struct assignment copy mistake resulted in
Heretic having a broken inventory system.

I am biased so take my grumbles with a grain of salt. However 9front has the advantage
of folks living with and scrutinizing these compilers "in production" for the last 15 years...

- moody

On 9/4/26 02:27, Arnold Robbins via TUHS wrote:
> This may be of interest to this crowd.  NOTE that this is NOT
> my work, I am simply passing the info on.
> 
> Arnold
> 
>> From: yoann.padioleau at gmail.com
>> To: 9fans <9fans at 9fans.net>
>> Date: Thu, 3 Sep 2026 16:24:08 -0400
>> Subject: [9fans] Goken9cc update, support for Linux, macOS, windows and 11
>>  archs!
>>
>> This is an update for the Goken9cc project I've announced a few months
>> ago on 9fans (and presented at IWP9): https://github.com/aryx/goken9cc
>>
>> To summarize: goken9cc is a portable, multi-architecture toolchain — C
>> compilers, assemblers, and linkers — together with a minimalist C
>> library, rooted in Ken Thompson's legendary work on the Plan 9 and
>> Inferno operating systems. First extended by Go developers, this
>> toolchain now brings cross-platform support for Linux, macOS, and
>> Windows while preserving the simplicity, elegance, and efficiency of
>> the original Plan 9 tools.
>>
>> In the future work section of my talk I was talking about the
>> support to produce Linux ELF binaries, macOS Mach-O binaries,
>> and windows PE binaries and it's now all working!
>>
>> There is also a multiplatform libc similar to the original Plan 9 libc
>> that can work on 11 architectures (i386, amd64, arm, arm64, riscv32, riscv64,
>> mips, powerpc, sparc, alpha, m68k) across 4 operating systems (Linux,
>> darwin, windows, plan9, with xv6 in the work).
>>
>> We can now even bootstrap goken using goken, that is using it to compile
>> itself on Linux, macOS, and windows (and we can still bootstrap it
>> using gcc and clang, the original goal of goken9cc).
>>
>> The included multiplatform libc is pretty complete as it
>> can be used to compile goken itself which contains not only the toolchain
>> but also the code of mk, rc, as well as many Plan 9 utilities.
>>
>> My plan now is to add a multiplatform libdraw to also produce
>> Linux, macOS, and windows binaries using graphics (relying on
>> Russ cox port of libdraw in plan9port and in drawterm).
>>
>> Happy to answer questions or requests for the project.
>>
>> PS: the code of goken is synced with my other principia softwarica project
>> so the code of goken is also fully explain in the principia books
>> at https://principia-softwarica.org/
>>
>>
>> AI disclaimer:
>> 95% of the code in goken9cc was written by humans (mostly Ken
>> Thompson, Rob Pike, Charles Forsyth, Richard Miller, and other Plan 9
>> contributors), and for the most part written more than 30 years
>> ago. What I did was essentially to package those old toolchains
>> together and then use AI to write the remaining 5% so that the
>> toolchains could work not just on Plan 9 for Plan 9 but also on and
>> for Linux, macOS, and Windows (imitating for the most part what was
>> done by Go developers for the Go language).
>>
>> All the clerical work of finding the right syscall numbers for each
>> architecture and operating systems for the multiplatform C library in
>> goken9cc (see lib_core/libc/{arch,syscall,os}) was done by Claude
>> Code, inspired by what Go developers did for Go (see the
>> GO/pkg/{syscall,runtime} directories).
>>
>> Most of the code written by AI is clearly marked with a special
>> claude: comment at the front and part of a commit authored by Claude
>> code. You can use the scripts/ai_percentage.py to get authorship LOC
>> statistics across the different directories in goken9cc.
>>
>> ------------------------------------------
>> 9fans: 9fans
>> Permalink: https://9fans.topicbox.com/groups/9fans/T2bd4bdf3bed27839-Mba276412b5bb732bb23582de
>> Delivery options: https://9fans.topicbox.com/groups/9fans/subscription



More information about the TUHS mailing list