|
From: kosmirror <kos...@us...> - 2025-08-04 19:00:38
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "A pseudo Operating System for the Dreamcast.".
The branch, master has been updated
via 75e5b0163e14034be800e1bdf5a642f0b7f0f1dc (commit)
via 32cfa1b72a5fde8f0bb83099fe2b6cd1f78f3e7c (commit)
via e7639e8b10b8542f22d94c426019f916dbf8754a (commit)
via 038db776feab17caa7986b4b29de2683fd96bdb3 (commit)
via 3b7e0bb5c55cc02b4bceec94d4cd96bc58618e2a (commit)
via 23b06506f768ac58988fd1cecd61ff7d1d42e20d (commit)
via 8de3fb5b7faffce275bb1cbf0c33ff44c720176a (commit)
via 14786c83f0905ed5e9e762dbfa282673b74f7f7e (commit)
via 261e4df25f1e5753af9c6ace43123700275f8724 (commit)
via 740e9ee6be796c7cc1d27afe8e95efcbbc63f0cf (commit)
via f6ebd5a9c477b778329e7ff5e2f4d00db134d2e1 (commit)
via d2e2655dec4ca3615a4e292ac124dc2cdc17dbba (commit)
via 7adf052d7b9ab755ad639f835355831e90ad3677 (commit)
via 36a44891ed3c905157801bf516aa17e7a7e0694a (commit)
via e31d21543d377151a3f8c9ce36496c994b457bf0 (commit)
via ccd733e30e3dd2fc072ca990b78a08cddf82da04 (commit)
via b925b8788557bbda5e85eccc8eca53991634ddb2 (commit)
via 1b51d1163db266572d062cd422f89010149c199f (commit)
via a5ffd1f2c185fc8bbb7d024608bb9b29e2365263 (commit)
via e1e1e59b628e986f228443d8f40d05551a6a7b80 (commit)
via 5c448267deae6a12bc1ccd0c70890e821b1b30d6 (commit)
via 66a2ca45e138282d4dc28c14660b2dbd8c21ad22 (commit)
via 22f208393b42b9f64b27e097296fb4d4e7684548 (commit)
via e66557eb2684e2ef1ff1d82cddee233e2f92905f (commit)
via 21c30655a9726d9e1b5fed14441b80f75c02c31f (commit)
via 35c23cac5a4e3d141cb4b285234fa7f178298b27 (commit)
from 6b306eb2fb8054fc60b46cc06ea09eb45fa4cb4a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 75e5b0163e14034be800e1bdf5a642f0b7f0f1dc
Author: Paul Cercueil <pa...@cr...>
Date: Mon Aug 4 17:30:08 2025 +0200
dc-chain: Update build instructions
Update the build instructions in the README.md to reflect the new
changes.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 32cfa1b72a5fde8f0bb83099fe2b6cd1f78f3e7c
Author: Paul Cercueil <pa...@cr...>
Date: Fri Jul 25 00:36:59 2025 +0200
dc-chain: Drop useless change in GCC patches
Those are not needed anymore as the fake-kos.c file provides the symbols
needed to compile and link a program that calls printf().
Signed-off-by: Paul Cercueil <pa...@cr...>
commit e7639e8b10b8542f22d94c426019f916dbf8754a
Author: Paul Cercueil <pa...@cr...>
Date: Thu Jul 24 20:45:56 2025 +0200
dc-chain: Add missing symbols to fake-kos.c
Add missing symbols that are needed for libobjc to compile properly.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 038db776feab17caa7986b4b29de2683fd96bdb3
Author: Paul Cercueil <pa...@cr...>
Date: Wed Jul 23 10:25:04 2025 +0200
dc-chain: Add __is_aligned() macro fix to Newlib patches
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 3b7e0bb5c55cc02b4bceec94d4cd96bc58618e2a
Author: Paul Cercueil <pa...@cr...>
Date: Sun Jul 13 17:36:38 2025 +0200
dc-chain: doc: Update path of default Dreamcast Makefile config
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 23b06506f768ac58988fd1cecd61ff7d1d42e20d
Author: Paul Cercueil <pa...@cr...>
Date: Sun Jul 13 17:33:28 2025 +0200
dc-chain: doc: Update changelog
Add a description of my changes in the changelog.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 8de3fb5b7faffce275bb1cbf0c33ff44c720176a
Author: Paul Cercueil <pa...@cr...>
Date: Wed Jul 9 16:01:28 2025 +0200
dc-chain: Add 15.0.0-lra toolchain profile
This toolchain profile can be used to test a toolchain with GCC's new
LRA register allocator instead of the old one.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 14786c83f0905ed5e9e762dbfa282673b74f7f7e
Author: Paul Cercueil <pa...@cr...>
Date: Mon Jun 9 22:51:10 2025 +0200
dc-chain: Add AICA toolchain profile
Add a toolchain profile to build a toolchain for the Dreamcast's AICA
sound co-processor.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 261e4df25f1e5753af9c6ace43123700275f8724
Author: Paul Cercueil <pa...@cr...>
Date: Thu Jun 26 15:31:21 2025 +0200
dc-chain: Add patches for GCC 8.5.0
GCC 8.5.0 is the last one that supports the ARM7DI processor.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 740e9ee6be796c7cc1d27afe8e95efcbbc63f0cf
Author: Paul Cercueil <pa...@cr...>
Date: Mon Jun 9 14:21:53 2025 +0200
dc-chain: Add support for PPC toolchains and add GameCube profile
Add support for building a powerpc-eabi toolchain, and add a profile for
the Nintendo GameCube.
Update the KOS patch for newlib and cherry-pick two patches from master
to fix building on PowerPC.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit f6ebd5a9c477b778329e7ff5e2f4d00db134d2e1
Author: Paul Cercueil <pa...@cr...>
Date: Sun Jul 13 17:16:21 2025 +0200
dc-chain: Remove multiple files in one single command
There's no need to run multiple "rm -rf" commands when a single one can
do the job.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit d2e2655dec4ca3615a4e292ac124dc2cdc17dbba
Author: Paul Cercueil <pa...@cr...>
Date: Wed Jul 2 16:32:58 2025 +0200
dc-chain: Detect and use number of CPU cores
Instead of hardcoding the default number of jobs to 2 (which is very low
by today's standards), leave the 'makejobs=' variable empty by default,
and update the Makefile scripts to automatically detect the number of
logical CPU cores, and use that as the number of jobs.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 7adf052d7b9ab755ad639f835355831e90ad3677
Author: Paul Cercueil <pa...@cr...>
Date: Wed Jul 2 15:46:44 2025 +0200
dc-chain: Do shallow clones of git repositories
We don't need the whole history tree of the git repositories we want to
clone. Shave off the download size (and therefore the build size) by
performing shallow clones.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 36a44891ed3c905157801bf516aa17e7a7e0694a
Author: Paul Cercueil <pa...@cr...>
Date: Wed Jul 2 15:09:09 2025 +0200
dc-chain: Don't override the toolchain's crt1.S
This is not needed anymore, as the linker script will pick the startup
code itself.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit e31d21543d377151a3f8c9ce36496c994b457bf0
Author: Paul Cercueil <pa...@cr...>
Date: Sun Jun 29 22:39:40 2025 +0200
Rework how startup code is handled
Instead of building the arch's startup.o and copying it inside the
toolchain as crt1.o, point the linker script to the correct startup
code from the KallistiOS lib folder.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit ccd733e30e3dd2fc072ca990b78a08cddf82da04
Author: Paul Cercueil <pa...@cr...>
Date: Sun Jun 29 22:37:40 2025 +0200
environ.sh: Drop $KOS_START
This was only used with GCC < 4.0, which we don't support anymore.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit b925b8788557bbda5e85eccc8eca53991634ddb2
Author: Paul Cercueil <pa...@cr...>
Date: Thu Jun 26 15:04:15 2025 +0200
dc-chain: Drop old KOS defines, move the rest to common GCC config file
The toolchain will only now just provide the __KOS_GCC_PATCHLEVEL__
macro. From the version specified there, KallistiOS can then figure out
whether or not it supports 32 MiB of RAM.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 1b51d1163db266572d062cd422f89010149c199f
Author: Paul Cercueil <pa...@cr...>
Date: Sat Jun 28 16:39:18 2025 +0200
dreamcast: Add support for toolchains without __KOS_GCC_32MB__
Newer toolchains don't define __KOS_GCC_32MB__ anymore as KOS does not
support any of the older toolchains not capable of 32 MiB RAM support.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit a5ffd1f2c185fc8bbb7d024608bb9b29e2365263
Author: Paul Cercueil <pa...@cr...>
Date: Wed Jun 25 21:06:24 2025 +0200
dc-chain: Replace arch-specific fake-kos.S with C code
The fake-kos.S files were only defining weak symbols as aliases to a
dummy function. This can be done in C as well; the advantage being that
the same C code can be used on all architectures.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit e1e1e59b628e986f228443d8f40d05551a6a7b80
Author: Paul Cercueil <pa...@cr...>
Date: Wed Jun 25 15:54:17 2025 +0200
dc-chain: Rework patch folders and support target-specific patches
Differenciate between the target-specific and host-specific patches to
keep the patches folder clean.
Add a target-specific search path for patches, so that it is possible to
conditionally patch the code according to the target arch.
Drop the execution rights on the newlib-4.3.0.20230120-kos.diff patch.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 5c448267deae6a12bc1ccd0c70890e821b1b30d6
Author: Paul Cercueil <pa...@cr...>
Date: Mon Jun 9 10:27:50 2025 +0200
dc-chain: Support multiple archs and decouple ARM
Instead of having all the scripts handle two architectures
(SH4 and ARM), with all rules duplicated, update them so that they will
support the architecture specified in the "platform" variable.
This means that the exact same scripts can be used for building the SH4
toolchain, and also the ARM toolchain. Later, it will also allow
building toolchains for other platforms.
One interesting side effect of this change is that a C library is now
built for the ARM.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 66a2ca45e138282d4dc28c14660b2dbd8c21ad22
Author: Paul Cercueil <pa...@cr...>
Date: Sun Jun 22 21:51:53 2025 +0200
dc-chain: Move gthr-kos.h to non-arch-specific path
The gthr-kos.h is not arch-specific. To avoid having to hardcode
different paths for different archs in the GCC patches, install the
gthr-kos.h file to an arch-independent path in libgcc.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 22f208393b42b9f64b27e097296fb4d4e7684548
Author: Paul Cercueil <pa...@cr...>
Date: Mon Jun 9 21:52:14 2025 +0200
dc-chain: Move profiles to platform subdirectory
To ease the introduction of multiarch in dc-chain, move the current
profiles to a dreamcast/ subdirectory.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit e66557eb2684e2ef1ff1d82cddee233e2f92905f
Author: Paul Cercueil <pa...@cr...>
Date: Mon Jun 9 22:43:25 2025 +0200
dc-chain: Make per-platform Makefile.cfg
Rename Makefile.default.cfg to Makefile.dreamcast.cfg.
Later, when we support more platforms, we can add
Makefile.<platform>.cfg.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 21c30655a9726d9e1b5fed14441b80f75c02c31f
Author: Paul Cercueil <pa...@cr...>
Date: Mon Jun 9 10:31:00 2025 +0200
utils: Add kos-gdb wrapper
This is a wrapper around gdb-multiarch, which sets a few settings so
that it can be used for Dreamcast development.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 35c23cac5a4e3d141cb4b285234fa7f178298b27
Author: Paul Cercueil <pa...@cr...>
Date: Mon Jun 9 21:47:26 2025 +0200
environ.sh: Export $KOS_GDB_CPU variable
This variable is defined to the CPU architecture name used with
gdb-multiarch.
Signed-off-by: Paul Cercueil <pa...@cr...>
-----------------------------------------------------------------------
Summary of changes:
doc/environ.sh.sample | 6 +
environ_base.sh | 16 +-
environ_dreamcast.sh | 2 +
kernel/arch/dreamcast/include/arch/arch.h | 2 +-
kernel/arch/dreamcast/kernel/Makefile | 4 +-
utils/build_wrappers/kos-cc | 4 +-
utils/build_wrappers/kos-gdb | 14 ++
utils/dc-chain/Makefile | 16 +-
.../{Makefile.default.cfg => Makefile.aica.cfg} | 69 +++-----
...Makefile.default.cfg => Makefile.dreamcast.cfg} | 22 +--
...{Makefile.default.cfg => Makefile.gamecube.cfg} | 75 +++------
utils/dc-chain/README.md | 177 ++++++++-------------
utils/dc-chain/doc/CHANGELOG.md | 9 ++
utils/dc-chain/doc/CONTRIBUTORS.md | 1 +
utils/dc-chain/doc/alpine.md | 2 +-
utils/dc-chain/doc/bsd.md | 2 +-
utils/dc-chain/doc/cygwin.md | 2 +-
utils/dc-chain/doc/debian.md | 2 +-
utils/dc-chain/doc/macos.md | 2 +-
utils/dc-chain/doc/mingw/mingw-w64.md | 2 +-
utils/dc-chain/doc/mingw/mingw.md | 2 +-
utils/dc-chain/patches/gcc/fake-kos.S | 82 ----------
utils/dc-chain/patches/gcc/fake-kos.c | 64 ++++++++
.../{ => hosts}/arm-Darwin/gcc-12.2.0-kos.diff | 0
.../{ => hosts}/arm-Darwin/gcc-13.1.0-kos.diff | 0
.../{ => hosts}/arm-Darwin/gcc-13.2.0-kos.diff | 0
.../{ => hosts}/arm-Darwin/gcc-8.4.0-kos.diff | 0
.../{ => hosts}/arm-Darwin/gcc-8.5.0-kos.diff | 0
.../{ => hosts}/arm-Darwin/gcc-9.3.0-kos.diff | 0
.../{ => hosts}/arm-Darwin/gcc-9.5.0-kos.diff | 0
.../i686-pc-mingw32/binutils-2.31.1.diff | 0
.../{ => hosts}/i686-pc-mingw32/binutils-2.34.diff | 0
.../{ => hosts}/i686-pc-mingw32/gdb-10.2.diff | 0
.../{ => hosts}/i686-pc-mingw32/gdb-7.12.1.diff | 0
.../{ => hosts}/i686-pc-mingw32/gdb-8.2.diff | 0
.../{ => hosts}/i686-pc-mingw32/gdb-8.3.1.diff | 0
.../{ => hosts}/i686-pc-mingw32/gdb-9.1.diff | 0
.../{ => hosts}/i686-pc-mingw32/gdb-9.2.diff | 0
.../i686-w64-mingw32/binutils-2.40.diff | 0
.../{ => hosts}/i686-w64-mingw32/gcc-12.2.0.diff | 0
.../{ => hosts}/i686-w64-mingw32/gcc-8.4.0.diff | 0
.../{ => hosts}/i686-w64-mingw32/gcc-8.5.0.diff | 0
.../{ => hosts}/i686-w64-mingw32/gcc-9.5.0.diff | 0
.../{ => hosts}/x86_64-pc-cygwin/gcc-13.2.0.diff | 0
.../{ => hosts}/x86_64-w64-mingw32/gcc-8.5.0.diff | 0
.../{ => hosts}/x86_64-w64-mingw32/gcc-9.5.0.diff | 0
.../patches/{ => targets}/gcc-13.2.0-kos.diff | 69 ++++----
.../patches/{ => targets}/gcc-13.4.0-kos.diff | 69 ++++----
.../patches/{ => targets}/gcc-13.4.1-kos.diff | 69 ++++----
.../patches/{ => targets}/gcc-14.3.0-kos.diff | 69 ++++----
.../patches/{ => targets}/gcc-14.3.1-kos.diff | 69 ++++----
.../gcc-15.0.0-lra.diff} | 107 +++++++------
.../patches/{ => targets}/gcc-15.1.0-kos.diff | 69 ++++----
.../patches/{ => targets}/gcc-15.1.1-kos.diff | 69 ++++----
.../patches/{ => targets}/gcc-16.0.0-kos.diff | 70 ++++----
.../patches/targets/gcc-8.5.0-clang17.diff | 74 +++++++++
.../gcc-8.5.0-kos.diff} | 104 ++++++------
.../patches/{ => targets}/gcc-9.5.0-kos.diff | 54 +++----
.../{ => targets}/newlib-4.3.0.20230120-kos.diff | 13 ++
.../{ => targets}/newlib-4.5.0.20241231-kos.diff | 56 +++++--
utils/dc-chain/profiles/aica/stable.mk | 41 +++++
.../{profile.15.1.0.mk => dreamcast/13.4.0.mk} | 30 ++--
.../13.4.1-dev.mk} | 38 ++---
.../{profile.13.4.0.mk => dreamcast/14.3.0.mk} | 30 ++--
.../14.3.1-dev.mk} | 36 ++---
.../15.0.0-lra.mk} | 37 ++---
.../{profile.14.3.0.mk => dreamcast/15.1.0.mk} | 30 ++--
.../15.1.1-dev.mk} | 36 ++---
.../16.0.0-dev.mk} | 36 ++---
.../9.5.0-winxp.mk} | 30 ++--
.../{profile.stable.mk => dreamcast/stable.mk} | 30 ++--
.../{profile.15.1.0.mk => gamecube/stable.mk} | 35 ++--
utils/dc-chain/scripts/binutils.mk | 18 +--
utils/dc-chain/scripts/build.mk | 77 +++------
utils/dc-chain/scripts/clean.mk | 68 +++-----
utils/dc-chain/scripts/download.mk | 35 ++--
utils/dc-chain/scripts/gcc-pass1.mk | 8 +-
utils/dc-chain/scripts/gcc-pass2.mk | 2 +-
utils/dc-chain/scripts/gdb.mk | 12 +-
utils/dc-chain/scripts/init.mk | 38 ++---
utils/dc-chain/scripts/newlib.mk | 26 +--
utils/dc-chain/scripts/patch.mk | 110 +++++--------
utils/dc-chain/scripts/phony.mk | 8 +-
utils/dc-chain/scripts/profile-defaults.mk | 26 +--
utils/dc-chain/scripts/variables.mk | 7 +-
utils/ldscripts/shlelf.xc | 6 +-
86 files changed, 1072 insertions(+), 1316 deletions(-)
create mode 100755 utils/build_wrappers/kos-gdb
copy utils/dc-chain/{Makefile.default.cfg => Makefile.aica.cfg} (73%)
copy utils/dc-chain/{Makefile.default.cfg => Makefile.dreamcast.cfg} (95%)
rename utils/dc-chain/{Makefile.default.cfg => Makefile.gamecube.cfg} (71%)
delete mode 100644 utils/dc-chain/patches/gcc/fake-kos.S
create mode 100644 utils/dc-chain/patches/gcc/fake-kos.c
rename utils/dc-chain/patches/{ => hosts}/arm-Darwin/gcc-12.2.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/arm-Darwin/gcc-13.1.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/arm-Darwin/gcc-13.2.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/arm-Darwin/gcc-8.4.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/arm-Darwin/gcc-8.5.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/arm-Darwin/gcc-9.3.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/arm-Darwin/gcc-9.5.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-pc-mingw32/binutils-2.31.1.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-pc-mingw32/binutils-2.34.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-pc-mingw32/gdb-10.2.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-pc-mingw32/gdb-7.12.1.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-pc-mingw32/gdb-8.2.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-pc-mingw32/gdb-8.3.1.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-pc-mingw32/gdb-9.1.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-pc-mingw32/gdb-9.2.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-w64-mingw32/binutils-2.40.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-w64-mingw32/gcc-12.2.0.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-w64-mingw32/gcc-8.4.0.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-w64-mingw32/gcc-8.5.0.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/i686-w64-mingw32/gcc-9.5.0.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/x86_64-pc-cygwin/gcc-13.2.0.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/x86_64-w64-mingw32/gcc-8.5.0.diff (100%)
rename utils/dc-chain/patches/{ => hosts}/x86_64-w64-mingw32/gcc-9.5.0.diff (100%)
rename utils/dc-chain/patches/{ => targets}/gcc-13.2.0-kos.diff (75%)
rename utils/dc-chain/patches/{ => targets}/gcc-13.4.0-kos.diff (75%)
rename utils/dc-chain/patches/{ => targets}/gcc-13.4.1-kos.diff (75%)
rename utils/dc-chain/patches/{ => targets}/gcc-14.3.0-kos.diff (75%)
rename utils/dc-chain/patches/{ => targets}/gcc-14.3.1-kos.diff (75%)
copy utils/dc-chain/patches/{gcc-15.1.0-kos.diff => targets/gcc-15.0.0-lra.diff} (55%)
rename utils/dc-chain/patches/{ => targets}/gcc-15.1.0-kos.diff (75%)
rename utils/dc-chain/patches/{ => targets}/gcc-15.1.1-kos.diff (75%)
rename utils/dc-chain/patches/{ => targets}/gcc-16.0.0-kos.diff (75%)
create mode 100644 utils/dc-chain/patches/targets/gcc-8.5.0-clang17.diff
copy utils/dc-chain/patches/{gcc-9.5.0-kos.diff => targets/gcc-8.5.0-kos.diff} (57%)
rename utils/dc-chain/patches/{ => targets}/gcc-9.5.0-kos.diff (79%)
rename utils/dc-chain/patches/{ => targets}/newlib-4.3.0.20230120-kos.diff (92%)
mode change 100755 => 100644
rename utils/dc-chain/patches/{ => targets}/newlib-4.5.0.20241231-kos.diff (85%)
create mode 100644 utils/dc-chain/profiles/aica/stable.mk
copy utils/dc-chain/profiles/{profile.15.1.0.mk => dreamcast/13.4.0.mk} (55%)
rename utils/dc-chain/profiles/{profile.13.4.1-dev.mk => dreamcast/13.4.1-dev.mk} (63%)
rename utils/dc-chain/profiles/{profile.13.4.0.mk => dreamcast/14.3.0.mk} (55%)
rename utils/dc-chain/profiles/{profile.14.3.1-dev.mk => dreamcast/14.3.1-dev.mk} (64%)
copy utils/dc-chain/profiles/{profile.16.0.0-dev.mk => dreamcast/15.0.0-lra.mk} (64%)
rename utils/dc-chain/profiles/{profile.14.3.0.mk => dreamcast/15.1.0.mk} (55%)
rename utils/dc-chain/profiles/{profile.15.1.1-dev.mk => dreamcast/15.1.1-dev.mk} (64%)
rename utils/dc-chain/profiles/{profile.16.0.0-dev.mk => dreamcast/16.0.0-dev.mk} (64%)
rename utils/dc-chain/profiles/{profile.9.5.0-winxp.mk => dreamcast/9.5.0-winxp.mk} (55%)
rename utils/dc-chain/profiles/{profile.stable.mk => dreamcast/stable.mk} (55%)
rename utils/dc-chain/profiles/{profile.15.1.0.mk => gamecube/stable.mk} (50%)
diff --git a/doc/environ.sh.sample b/doc/environ.sh.sample
index eb846c4a..bdee2cb7 100644
--- a/doc/environ.sh.sample
+++ b/doc/environ.sh.sample
@@ -106,6 +106,12 @@ export KOS_LOADER="dc-tool -x"
#export KOS_LOADER="dc-tool-ip -t 192.168.1.100 -x"
#export KOS_LOADER="dc-tool-ser -t /dev/ttyS0 -x"
+# GDB utility
+#
+# The kos-gdb helper will attempt to auto-detect the proper GDB program
+# to use. You can force it by specifying the path here.
+#export KOS_GDB="sh-elf-gdb"
+
# Default Compiler Flags
#
# Resets build flags. You can also initialize them to some preset
diff --git a/environ_base.sh b/environ_base.sh
index 21b7cf01..b2fa235a 100644
--- a/environ_base.sh
+++ b/environ_base.sh
@@ -60,18 +60,4 @@ export KOS_CPPSTD="-std=gnu++17"
export KOS_GCCVER="`kos-cc -dumpversion`"
-case $KOS_GCCVER in
- 2* | 3*)
- echo "Your GCC version is too old. You probably will run into major problems!"
- export KOS_LDFLAGS="${KOS_CFLAGS} ${KOS_LDFLAGS} -nostartfiles -nostdlib ${KOS_LIB_PATHS}" ;;
- *)
- export KOS_LDFLAGS="${KOS_CFLAGS} ${KOS_LDFLAGS} ${KOS_LD_SCRIPT} -nodefaultlibs ${KOS_LIB_PATHS}" ;;
-esac
-
-# Some extra vars based on architecture.
-case $KOS_GCCVER in
- 2* | 3*)
- export KOS_START="${KOS_ARCH_DIR}/kernel/startup.o" ;;
- *)
- export KOS_START="" ;;
-esac
+export KOS_LDFLAGS="${KOS_CFLAGS} ${KOS_LDFLAGS} ${KOS_LD_SCRIPT} -nostdlib ${KOS_LIB_PATHS}"
diff --git a/environ_dreamcast.sh b/environ_dreamcast.sh
index cacecaa4..7dd3e872 100644
--- a/environ_dreamcast.sh
+++ b/environ_dreamcast.sh
@@ -29,6 +29,8 @@ export KOS_AFLAGS="${KOS_AFLAGS} -little"
export KOS_LDFLAGS="${KOS_LDFLAGS} ${KOS_SH4_PRECISION} -ml -Wl,--gc-sections"
export KOS_LD_SCRIPT="-T${KOS_BASE}/utils/ldscripts/shlelf.xc"
+export KOS_GDB_CPU=sh4
+
if [ x${KOS_SUBARCH} = xnaomi ]; then
export KOS_CFLAGS="${KOS_CFLAGS} -D__NAOMI__"
export KOS_LDFLAGS="${KOS_LDFLAGS} -Wl,--defsym=LOAD_OFFSET=0x8c020000"
diff --git a/kernel/arch/dreamcast/include/arch/arch.h b/kernel/arch/dreamcast/include/arch/arch.h
index 79a0fe83..112bb187 100644
--- a/kernel/arch/dreamcast/include/arch/arch.h
+++ b/kernel/arch/dreamcast/include/arch/arch.h
@@ -33,7 +33,7 @@ __BEGIN_DECLS
*/
/** \brief Top of memory available, depending on memory size. */
-#ifdef __KOS_GCC_32MB__
+#if defined(__KOS_GCC_32MB__) || __KOS_GCC_PATCHLEVEL__ >= 2025062800
extern uint32 _arch_mem_top;
#else
#pragma message "Outdated toolchain: not patched for 32MB support, limiting "\
diff --git a/kernel/arch/dreamcast/kernel/Makefile b/kernel/arch/dreamcast/kernel/Makefile
index 864b23f0..f3dabe6c 100644
--- a/kernel/arch/dreamcast/kernel/Makefile
+++ b/kernel/arch/dreamcast/kernel/Makefile
@@ -18,12 +18,10 @@ COPYOBJS += uname.o
OBJS = $(COPYOBJS) startup.o
SUBDIRS =
-CRT1_PATH = $(shell $(KOS_CC) $(KOS_CFLAGS) -print-file-name=crt1.o)
-
myall: $(OBJS)
-cp $(COPYOBJS) $(KOS_BASE)/kernel/build/
+ -cp startup.o $(KOS_BASE)/lib/$(KOS_ARCH)/_kos_startup.o
-rm banner.h authors.h banner.o uname.o
- -cp startup.o $(CRT1_PATH)
include $(KOS_BASE)/Makefile.prefab
diff --git a/utils/build_wrappers/kos-cc b/utils/build_wrappers/kos-cc
index 17042ef1..3bb3c289 100755
--- a/utils/build_wrappers/kos-cc
+++ b/utils/build_wrappers/kos-cc
@@ -37,9 +37,9 @@ case $USEMODE in
1)
# In link mode, add all the extra processing.
if [ x${KOS_WRAPPERS_VERBOSE} = x"1" ]; then
- echo ${KOS_CC} ${KOS_CFLAGS} ${KOS_LDFLAGS} ${KOS_START} "$@" ${KOS_LIBS}
+ echo ${KOS_CC} ${KOS_CFLAGS} ${KOS_LDFLAGS} "$@" ${KOS_LIBS}
fi
- exec ${KOS_CC} ${KOS_CFLAGS} ${KOS_LDFLAGS} ${KOS_START} "$@" ${KOS_LIBS}
+ exec ${KOS_CC} ${KOS_CFLAGS} ${KOS_LDFLAGS} "$@" ${KOS_LIBS}
;;
2)
diff --git a/utils/build_wrappers/kos-gdb b/utils/build_wrappers/kos-gdb
new file mode 100755
index 00000000..1711b878
--- /dev/null
+++ b/utils/build_wrappers/kos-gdb
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# If $KOS_GDB is not overriden, default to sh-elf-gdb if found;
+# otherwise default to gdb-multiarch; in last resort, try to use gdb.
+[ ! -x "$KOS_GDB" ] && KOS_GDB=$(which $KOS_CC_PREFIX-gdb)
+[ ! -x "$KOS_GDB" ] && KOS_GDB=$(which gdb-multiarch)
+[ ! -x "$KOS_GDB" ] && KOS_GDB=$(which gdb)
+[ ! -x "$KOS_GDB" ] && echo "GDB program not found; please set $$KOS_GDB." && exit 1
+
+# Detect if GDB actually supports the target architecture.
+RESULT=$($KOS_GDB -iex "set architecture $KOS_GDB_CPU" -iex quit 2>&1 >/dev/null)
+[ -n "$RESULT" ] && echo "GDB program does not support $KOS_GDB_CPU." && exit 1
+
+exec $KOS_GDB -iex "set architecture $KOS_GDB_CPU" -iex "set sysroot $KOS_PORTS" -iex "target remote 127.0.0.1:2159" $*
diff --git a/utils/dc-chain/Makefile b/utils/dc-chain/Makefile
index 81f68dec..27cc8bc3 100644
--- a/utils/dc-chain/Makefile
+++ b/utils/dc-chain/Makefile
@@ -14,20 +14,20 @@ ifneq ("$(wildcard $(config_file))","")
$(info +++ Using configuration from $(config_file))
include $(config_file)
else
- ifneq ("$(wildcard Makefile.default.cfg)","")
- $(info +++ Using configuration from Makefile.default.cfg)
- include Makefile.default.cfg
+ ifneq ("$(platform)","")
+ $(info +++ Using configuration from Makefile.$(platform).cfg)
+ include Makefile.$(platform).cfg
else
- $(error No configuration file found at $(config_file) or Makefile.default.cfg)
+ $(error No configuration file found at $(config_file))
endif
endif
# Toolchain profiles
include scripts/profile-defaults.mk
-ifneq ("$(wildcard profiles/profile.$(toolchain_profile).mk)","")
- include profiles/profile.$(toolchain_profile).mk
+ifneq ("$(wildcard profiles/$(platform)/$(toolchain_profile).mk)","")
+ include profiles/$(platform)/$(toolchain_profile).mk
else
- $(error No toolchain profile file found at profiles/profile.$(toolchain_profile).mk)
+ $(error No toolchain profile file found at profiles/$(platform)/$(toolchain_profile).mk)
endif
# Download functions
@@ -44,7 +44,7 @@ include scripts/variables.mk
default: build gdb
-all: build build-arm gdb
+all: build gdb
# ---- download {{{
diff --git a/utils/dc-chain/Makefile.default.cfg b/utils/dc-chain/Makefile.aica.cfg
similarity index 73%
copy from utils/dc-chain/Makefile.default.cfg
copy to utils/dc-chain/Makefile.aica.cfg
index 6658076a..e1f6bd5c 100644
--- a/utils/dc-chain/Makefile.default.cfg
+++ b/utils/dc-chain/Makefile.aica.cfg
@@ -5,18 +5,15 @@
### TOOLCHAIN PROFILE ###
#########################
+# One of the supported platforms:
+# - dreamcast: Build a toolchain for the SEGA Dreamcast
+# - aica: Build a toolchain for the Dreamcast's AICA co-processor
+# - gamecube: Build a toolchain for the Nintendo GameCube
+platform=aica
+
# Choose a toolchain profile from the following available options:
# Release toolchains:
-# - 9.5.0-winxp: Legacy: Most recent versions of tools which run on Windows XP.
-# - stable: Stable: Well-tested; based on GCC 13.2.0, released 2023-07-27.
-# - 13.4.0: Testing: Latest release in the GCC 13 series, released 2025-06-05.
-# - 14.3.0: Testing: Latest release in the GCC 14 series, released 2025-05-23.
-# - 15.1.0: Testing: Latest release in the GCC 15 series, released 2025-04-25.
-# Development toolchains:
-# - 13.4.1-dev Bleeding edge GCC 13 series from git.
-# - 14.3.1-dev Bleeding edge GCC 14 series from git.
-# - 15.1.1-dev Bleeding edge GCC 15 series from git.
-# - 16.0.0-dev Bleeding edge GCC 16 series from git.
+# - stable: Stable: Latest toolchain available.
# If unsure, select stable. See README.md for more detailed descriptions.
toolchain_profile=stable
@@ -43,23 +40,19 @@ download_protocol=https
### BUILD OPTIONS ###
#####################
-### SH toolchain install path
-# Specify the directory where the SH toolchain will be installed. This setting
+### Toolchains install path
+# Specify the directory where the toolchains will be installed. This setting
# must match the KOS_CC_BASE setting in your KOS "environ.sh" configuration.
-sh_toolchain_path=/opt/toolchains/dc/sh-elf
-
-### ARM toolchain install path
-# Specify the directory where the ARM toolchain will be installed. This setting
-# must match the DC_ARM_BASE setting in your KOS "environ.sh" configuration.
-arm_toolchain_path=/opt/toolchains/dc/arm-eabi
+toolchain_path=/opt/toolchains/dc/arm-eabi
### Make jobs (n|<empty>)
# Set this value to the number of parallel jobs you want to run with make.
-# For fastest toolchain building, set to the number of CPU threads available.
+# Leave it empty to use a number of parallel jobs that corresponds to the
+# number of CPU threads available.
# Using multiple jobs may cause issues in certain environments and may be
# automatically disabled. If you encounter errors building your toolchain,
# reduce the number of jobs to 1 to avoid issues and ease troubleshooting.
-makejobs=2
+makejobs=
### Verbose (1|0)
# Choose whether to actively display compilation messages on the screen.
@@ -85,20 +78,20 @@ erase=1
# support included. KallistiOS provides several examples with C++ support, so it
# is enabled by default. Adding C++ support requires extra disk space and
# compilation time, so you may disable it here if you do not plan on using C++.
-enable_cpp=1
+enable_cpp=0
### Enable Objective-C
# Builds Objective-C support. Currently, this builds the Obj-C compiler and
# runtime, but does not build a standard library. The GNUStep Base Library is
# currently in active development for future inclusion in the kos-ports library.
# KallistiOS provides examples with Obj-C support, so it is enabled by default.
-enable_objc=1
+enable_objc=0
### Enable Objective C++
# Builds Objective C++ support. This hybrid language allows both C++ and Obj-C
# methods to be called from both contexts. Enabled by default as both the C++
# and Obj-C languages are already enabled by default.
-enable_objcpp=1
+enable_objcpp=0
### Enable D
# Builds D support. This will build the D compiler, but does not build the
@@ -128,32 +121,8 @@ enable_objcpp=1
### GCC OPTIONS ###
###################
-### Floating-point precision support (m4-single|m4-single-only|m4|m4-nofpu)
-# Build support for various SH4 floating-point operation ABIs. KallistiOS
-# supports both the single-precision-default ABI (m4-single) and the
-# single-precision-only ABI (m4-single-only). When using m4-single, the SH4 will
-# be in single-precision mode upon function entry but will switch to double-
-# precision mode if 64-bit doubles are used. When using m4-single-only, the SH4
-# will always be in single-precision mode and 64-bit doubles will be truncated to
-# 32-bit floats. In double-precision mode (m4), which is unsupported by
-# KallistiOS, the SH4 will be in double precision mode upon function entry.
-# Finally in no fpu mode (m4-nofpu), which is also unsupported by KallistiOS and
-# objc/++, there is no support for floating-point operations at all.
-# Historically, m4-single-only was used in both official and homebrew Dreamcast
-# software, but m4-single is the default as of KOS 2.2.0 to increase
-# compatibility with newer libraries which require 64-bit doubles.
-precision_modes=m4-single,m4-single-only
-
-### Default floating-point mode (m4-single|m4-single-only|m4|m4-nofpu)
-# Choose the default floating-point precision ABI used when GCC is invoked. This
-# may be overridden by passing -m4-single, -m4-single-only, or -m4 to GCC.
-default_precision=m4-single
-
-### GCC threading model (single|kos)
-# KallistiOS patches to GCC provide a 'kos' thread model, which should be used.
-# If you want to disable threading support for C++, Objective-C, and so forth,
-# you can set this option to 'single'.
-thread_model=kos
+### GCC threading model (single)
+thread_model=single
### Automatic patching for KallistiOS (1|0)
# Uncomment this option if you want to disable applying KallistiOS patches to
@@ -175,7 +144,7 @@ thread_model=kos
# needed by KallistiOS. This will keep the generated toolchain completely raw.
# This will also disable the 'kos' thread model. Only do this if you understand
# what you are doing.
-#auto_fixup_sh4_newlib=0
+auto_fixup_sh4_newlib=0
### C99 format specifier support (1|0)
# Define this to build Newlib with additional support for the C99 format
diff --git a/utils/dc-chain/Makefile.default.cfg b/utils/dc-chain/Makefile.dreamcast.cfg
similarity index 95%
copy from utils/dc-chain/Makefile.default.cfg
copy to utils/dc-chain/Makefile.dreamcast.cfg
index 6658076a..14ac30ad 100644
--- a/utils/dc-chain/Makefile.default.cfg
+++ b/utils/dc-chain/Makefile.dreamcast.cfg
@@ -5,6 +5,12 @@
### TOOLCHAIN PROFILE ###
#########################
+# One of the supported platforms:
+# - dreamcast: Build a toolchain for the SEGA Dreamcast
+# - aica: Build a toolchain for the Dreamcast's AICA co-processor
+# - gamecube: Build a toolchain for the Nintendo GameCube
+platform=dreamcast
+
# Choose a toolchain profile from the following available options:
# Release toolchains:
# - 9.5.0-winxp: Legacy: Most recent versions of tools which run on Windows XP.
@@ -43,23 +49,19 @@ download_protocol=https
### BUILD OPTIONS ###
#####################
-### SH toolchain install path
-# Specify the directory where the SH toolchain will be installed. This setting
+### Toolchains install path
+# Specify the directory where the toolchain will be installed. This setting
# must match the KOS_CC_BASE setting in your KOS "environ.sh" configuration.
-sh_toolchain_path=/opt/toolchains/dc/sh-elf
-
-### ARM toolchain install path
-# Specify the directory where the ARM toolchain will be installed. This setting
-# must match the DC_ARM_BASE setting in your KOS "environ.sh" configuration.
-arm_toolchain_path=/opt/toolchains/dc/arm-eabi
+toolchain_path=/opt/toolchains/dc/sh-elf
### Make jobs (n|<empty>)
# Set this value to the number of parallel jobs you want to run with make.
-# For fastest toolchain building, set to the number of CPU threads available.
+# Leave it empty to use a number of parallel jobs that corresponds to the
+# number of CPU threads available.
# Using multiple jobs may cause issues in certain environments and may be
# automatically disabled. If you encounter errors building your toolchain,
# reduce the number of jobs to 1 to avoid issues and ease troubleshooting.
-makejobs=2
+makejobs=
### Verbose (1|0)
# Choose whether to actively display compilation messages on the screen.
diff --git a/utils/dc-chain/Makefile.default.cfg b/utils/dc-chain/Makefile.gamecube.cfg
similarity index 71%
rename from utils/dc-chain/Makefile.default.cfg
rename to utils/dc-chain/Makefile.gamecube.cfg
index 6658076a..2018bde0 100644
--- a/utils/dc-chain/Makefile.default.cfg
+++ b/utils/dc-chain/Makefile.gamecube.cfg
@@ -5,18 +5,14 @@
### TOOLCHAIN PROFILE ###
#########################
+# One of the supported platforms:
+# - dreamcast: Build a toolchain for the SEGA Dreamcast
+# - aica: Build a toolchain for the Dreamcast's AICA co-processor
+# - gamecube: Build a toolchain for the Nintendo GameCube
+platform=gamecube
+
# Choose a toolchain profile from the following available options:
-# Release toolchains:
-# - 9.5.0-winxp: Legacy: Most recent versions of tools which run on Windows XP.
-# - stable: Stable: Well-tested; based on GCC 13.2.0, released 2023-07-27.
-# - 13.4.0: Testing: Latest release in the GCC 13 series, released 2025-06-05.
-# - 14.3.0: Testing: Latest release in the GCC 14 series, released 2025-05-23.
-# - 15.1.0: Testing: Latest release in the GCC 15 series, released 2025-04-25.
-# Development toolchains:
...<truncated>...
hooks/post-receive
--
A pseudo Operating System for the Dreamcast.
|