- Shell 58.5%
- PowerShell 23.7%
- Dockerfile 15%
- Batchfile 2.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Release / build-windows-native (push) Successful in 7m35s
Build / build-windows-native (push) Successful in 7m37s
Release / build-native-linux (push) Successful in 41m30s
Build / build-native-linux (push) Successful in 41m45s
Build / sanity-check-linux (push) Successful in 11s
Release / package-linux (push) Successful in 1m4s
Release / build-windows-cross (push) Successful in 35m1s
Build / build-windows-cross (push) Successful in 35m53s
Release / package-windows (push) Successful in 1m6s
Build / sanity-check-windows-cross (push) Successful in 19s
Skip the -static host LDFLAGS (lib/common.sh) and the CMake -static/-static-libgcc/-static-libstdc++ linker flags (dvp's masp/ openvcl steps) on Darwin - Apple's linker has no static libSystem to link against, and Apple Clang hard-errors on -static-libgcc alone. Also silence a Clang-21-only -Werror=tautological-compare in binutils' readelf.c, only reachable via EE's 64-bit ELF path. Verified with real builds on Apple Silicon: EE (C and C++), IOP, and DVP (masp/openvcl) all build and produce working cross-compilers/ tools. Documented the macOS build path (prerequisites, invocation, and why these differ from Linux/Windows) in README.md. Co-Authored-By: Claude Sonnet 5 <[email protected]> |
||
| .forgejo/workflows | ||
| docker | ||
| dvp | ||
| ee | ||
| iop | ||
| lib | ||
| .dockerignore | ||
| .gitignore | ||
| build-all.bat | ||
| build-dvp.bat | ||
| build-ee.bat | ||
| build-iop.bat | ||
| install-msys2.ps1 | ||
| LICENSE | ||
| README.md | ||
| release-sdk.ps1 | ||
| release-toolchain-linux.sh | ||
| release-toolchain.ps1 | ||
ps2toolchain
Builds the PS2 homebrew toolchain (EE, IOP, and DVP cross-compilers/ binutils) on Windows, Linux, and macOS. Windows uses a portable MSYS2 install - no system installer, no manual PATH setup; Linux and macOS build natively (see "Building for Linux"/"Building for macOS" below).
Setup (Windows)
powershell -ExecutionPolicy Bypass -File install-msys2.ps1
Downloads a portable MSYS2 into .\build\msys2 inside this repo and installs the packages the build needs.
Build (Windows)
build-all.bat
Builds DVP, then IOP, then EE, into .\build\toolchain. Or build one
target at a time with build-ee.bat, build-iop.bat, build-dvp.bat.
Everything the build generates - MSYS2, cloned sources, build trees, the
installed toolchain itself - lives under build\ in this repo and
nowhere else. It's gitignored; delete it any time to start clean.
Each target's build.sh fetches every source repo it needs up front,
before building anything, so a network problem or a bad ref fails fast
instead of surfacing after an earlier stage has already spent minutes
compiling. It also accepts specific step numbers, to re-run just one
stage without repeating the whole thing - e.g. from inside an MSYS2
shell: cd ee && ./build.sh 3 re-runs only the newlib step.
Building for Linux
./release-toolchain-linux.sh
Builds inside Docker (needs Docker installed) into build/release/ -
see docker/README.md for how the image works and why the output
isn't tied to a particular distro despite being built inside one.
Building for macOS
Native build, no Docker/VM - ee, iop, and dvp's own build.sh
already run directly under macOS's own bash, the same way they do on
Linux.
Prerequisites (Apple Silicon and Intel both work):
xcode-select --install
brew install gmp mpfr libmpc gnu-sed texinfo
gmp/mpfr/libmpc are GCC's own numeric-library build deps (Apple
doesn't ship these); gnu-sed is needed because GCC's build assumes
GNU sed's flags and macOS ships BSD sed under that name; texinfo
provides makeinfo, which check_dependencies (lib/common.sh)
requires. All four are picked up automatically once installed -
macos_extra_configure_opts (lib/common.sh) finds them via
brew --prefix.
Then build each target the same way as on Linux:
PS2DEV="$(pwd)/build/toolchain" bash ee/build.sh
PS2DEV="$(pwd)/build/toolchain" bash iop/build.sh
PS2DEV="$(pwd)/build/toolchain" bash dvp/build.sh
A few things behave differently on macOS than on Linux/Windows, all handled automatically:
- The host tools this build produces are not statically linked
(
lib/common.sh'sprepare_build_envskips-statichere) - Apple's linker has no staticlibSystemto link a whole executable against. A macOS-built toolchain instead dynamically links against the Homebrewgmp/mpfr/libmpcinstalled above, so keep those installed on any machine that runs it. dvp/steps/01-masp.sh/02-openvcl.sh(CMake) drop-static/-static-libgcc/-static-libstdc++entirely on macOS - Apple Clang hard-errors on-static-libgccalone and can't link-staticat all.
Layout
lib/common.sh - shared helpers (source fetching, host env setup)
ee/ - EE (Emotion Engine) toolchain: binutils + 2-stage GCC/newlib
iop/ - IOP (I/O Processor) toolchain: vanilla binutils + GCC
dvp/ - DVP (Vector Unit) toolchain: masp + openvcl (dvp-as is the Go tool in ps2/tools)
docker/ - Dockerfiles + design notes for the Linux build
build/ - gitignored - everything generated: msys2/, toolchain/ (install prefix), ee/, iop/, dvp/ (source + build trees), release/
Each target directory has its own config.sh (source repo/ref pins) and
build.sh (orchestrates steps/*.sh in order).
License
This repo's own code is public domain (CC0 1.0 - see LICENSE) and build multiple projects. See each project's own repo for its license terms.