I support several old versions of gcc, from 2.95 onwards, from aout to ecof to elf.
I must say that in addition to the problem you had, many things also depend on the ecosystem(1)
and once again it is quicker to use a virtual machine (or a container(Linux))
It was just the straw that broke the camel's back for me. I've had many other similar problems with MacOS, for example the last time I tried to build KiCad on it it had a dependency on an old SDK that's no longer available, and Apple only offers the latest version of XCode. I'd have to find an old OS no longer available, to possibly download an old version of XCode. Their dev setup is streamlined only for exactly one purpose: developing MacOS apps, which is completely uninteresting to me. It just so happened that the KiCad developers had upgraded their XCode installations and that old SDK was still available to them. But there was no way to bootstrap a new build setup. This was a few years ago, so maybe things have changed, but I'm sure if I want to try again on Linux all I need is to install the dependencies, with just dnf, maybe something that needs to be built manually, and I'm off to the races.
When I switched to MacOS (from Sun Solaris) around 2004 it had none of these problems. It was Unix with a superior UI, but slowly over time it has turned into something else. For the minor warts with Linux (like gnome-shell deciding it's cpu suck time) the things I use a computer for are so much more straightforward.