And wonderfully, a lot of issues presenting themselves while working on GCC 12 support earlier this year and GCC 13 now turned out to be related to bugs already plaguing older dev environments like KOS+GCC9. Some issues around C++ threading and mutexes were fixed during this process, for example.
If you want to experiment with any of those sweet new C23 and C++23 features, or maybe test out GCC 13's (very experimental) Rust support, for example, here's how. I'm sure Falco will want to follow up soon showing off some new C++23 stuff.
![Wink ;)](./images/smilies/icon_e_wink.gif)
Code: Select all
❯ sh-elf-gcc -v
Using built-in specs.
COLLECT_GCC=sh-elf-gcc
COLLECT_LTO_WRAPPER=/opt/toolchains/dc/13.0.1-bleeding/sh-elf/libexec/gcc/sh-elf/13.0.1/lto-wrapper
Target: sh-elf
Configured with: ../gcc-13/configure --target=sh-elf --prefix=/opt/toolchains/dc/13.0.1-bleeding/sh-elf --with-newlib --disable-libssp --disable-tls --enable-threads=kos --enable-languages=c,c++,objc,obj-c++,rust --enable-checking=release --with-multilib-list=m4-single-only --with-endian=little --with-cpu=m4-single-only CC=cc CXX=c++
Thread model: kos
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.1 20230312 (experimental) (GCC)
These instructions assume you're familiar with the typical instructions for building a toolchain with dc-chain.
Clone the gcc13 branch of KOS:
Code: Select all
git clone -b gcc13 https://github.com/KallistiOS/KallistiOS.git kos-gcc13
Code: Select all
mv config.mk.bleeding.sample config.mk
After running ./download.sh and ./unpack.sh, open config.mk once again and comment out this line like so:
Code: Select all
#sh_gcc_ver=12.2.0
Code: Select all
sh_gcc_ver=13
Code: Select all
git clone https://github.com/gcc-mirror/gcc.git gcc-13