2021-10-19
Out of curiosity I recently tried to build the toolchain for ZPU – and as I rather suspected would happen, it has succumbed to the Half Life of Software, and no longer builds cleanly on up-to-date systems.
[smug mode]In the meantime, I recently succeeded in building the 832 toolchain (832a, 832l, 832d and the 832 VBCC backend) for Amiga, using the Amiga version of VBCC and the Minimig core![/smug mode]
I still have a definite soft spot for ZPU, though.
While RISC-V gets all the limelight and glory these days, the next-big-thing CPU is not without its drawbacks: its code density isn’t great, unless you use the compressed ISA. However you can’t use *just* the compressed ISA, so it comes with a significant cost in terms of logic footprint. ZPU, on the other hand, may not be any of kind of speed demon, but its code density is good, the core itself (whichever version you pick – there are plenty to choose from) can be anywhere between small and tiny, and the toolchain supports floating point and C++ – both points it scores over 832.
So when someone happened to ask on the MiSTer forums whether anyone had succeeded in building the toolchain recently, I looked into the problem in a bit more detail.
It turns out the upstream zpugcc repository has a couple of issues referencing the problem, and two different outstanding pull requests with fixes. So I’ve applied those pull requests, and a couple of others, to my own fork of the repo, built using the latest Ubuntu LTS to verify that it builds cleanly – spotted and fixed one other very minor bug – and pushed the result to https://github.com/robinsonb5/zpugcc
I’ve no idea how long it will be before it breaks again – the only certainty is that, with a project as complex as GCC, and a backend into which no-one seems prepared to invest the full ongoing maintenance cost, it will break again sooner or later.
So, until next time…