(Edit: This GCC 12 toolchain config has been merged into KallistiOS main.)
We have been looking at supporting newer GCC versions for better language support to bring C++20, C23, ObjC, and Rust support for Dreamcast.
First, GCC 12, which has been used by GyroVorbis over the past few months for his libGimbal library development. However, we ran into some snags when reconciling his codebase against the latest KOS and patches, so I'm not entirely sure of the stability yet. It also includes Newlib 4.1.0 (edit: now Newlib 4.3.).
To build this toolchain, follow the typical directions, but check out KOS using the following repo:
git clone -b gcc12 https://github.com/darcagn/KallistiOS.git
and when setting up the toolchain config, choose the new config.mk.latest.sample file as your configuration template:
mv config.mk.latest.sample config.mk
Second, gcc-rs, the experimental GCC Rust compiler. Cepawiel did an excellent job of getting a raw gcc-rs toolchain built with libronin, which he put in a Docker container and uploaded to his repo here. He was able to include a libronin example to print "hello, world" over serial cable. It's just calling C, but it's a breakthrough proof of concept. Following his example, I was able to get a Hello, World! example going on the screen: However, we ran into snags getting KOS to work instead of the simpler libronin. We were able to break through, tonight, however, and get a KOS toolchain built using gcc-rs. Cepawiel is working on a much better example for this toolchain, but in the mean time, here's how you can build it yourself. Keep in mind there's no standard library support yet, so you're pretty much on your own making bindings to existing stuff.
To build this toolchain, follow the typical directions, but check out KOS using the following repo:
Code: Select all
git clone -b gcc-rs https://github.com/darcagn/KallistiOS.git
Code: Select all
mv config.mk.latest.sample config.mk
Code: Select all
sh_gcc_ver=12.2.0
Code: Select all
sh_gcc_ver=rs
Code: Select all
git clone https://github.com/Rust-GCC/gccrs gcc-rs