Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, ubuntu-latest]
os: [macos-15-intel, ubuntu-latest, macos-26]

steps:
- uses: actions/checkout@v6
Expand All @@ -23,7 +23,7 @@ jobs:
sudo apt-get update
sudo apt-get -y install autoconf automake bison flex gcc libelf-dev make texinfo libncurses5-dev patch python3 python-is-python3 subversion wget zlib1g-dev libtool-bin python3-dev bzip2 libgmp3-dev pkg-config

- name: Install macOS requirements
- name: Install macOS intel requirements
if: matrix.os == 'macos-15-intel'
shell: arch -x86_64 bash -e {0}
env:
Expand All @@ -33,6 +33,16 @@ jobs:
run: |
brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo

- name: Install macOS arm64 requirements
if: matrix.os == 'macos-26'
shell: bash -e {0}
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_ENV_HINTS: 1
run: |
brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo

- name: Runs all the stages in the shell
if: matrix.os == 'ubuntu-latest'
shell: bash -e {0}
Expand Down Expand Up @@ -61,6 +71,20 @@ jobs:
export PATH=$PATH:$PS3DEV/spu/bin
./toolchain.sh

- name: Runs all the stages in the shell
if: matrix.os == 'macos-26'
shell: bash -e {0}
env:
BUILD_PS3TOOLCHAIN_ONLY: 1
run: |
mkdir $PWD/ps3dev
export PS3DEV=$PWD/ps3dev
export PSL1GHT=$PS3DEV
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin
./toolchain.sh

- name: Get short SHA
id: slug
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> "$GITHUB_OUTPUT"
Expand Down
30 changes: 30 additions & 0 deletions patches/gcc-7.2.0-PS3-macos-arm64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff -Nru gcc-7.2.0/gcc/config/aarch64/aarch64.h gcc-7.2.0-mac/gcc/config/aarch64/aarch64.h
--- gcc-7.2.0/gcc/config/aarch64/aarch64.h 2017-01-19 20:51:49
+++ gcc-7.2.0-mac/gcc/config/aarch64/aarch64.h 2026-06-09 16:10:14
@@ -930,7 +930,7 @@
#define MCPU_TO_MARCH_SPEC_FUNCTIONS \
{ "rewrite_mcpu", aarch64_rewrite_mcpu },

-#if defined(__aarch64__)
+#if defined(__aarch64__) && ! defined(__APPLE__)
extern const char *host_detect_local_cpu (int argc, const char **argv);
# define EXTRA_SPEC_FUNCTIONS \
{ "local_cpu_detect", host_detect_local_cpu }, \
diff -Nru gcc-7.2.0/gcc/config/host-darwin.c gcc-7.2.0-mac/gcc/config/host-darwin.c
--- gcc-7.2.0/gcc/config/host-darwin.c 2017-01-01 09:07:43
+++ gcc-7.2.0-mac/gcc/config/host-darwin.c 2026-06-09 16:09:16
@@ -22,6 +22,8 @@
#include "coretypes.h"
#include "diagnostic-core.h"
#include "config/host-darwin.h"
+#include "hosthooks.h"
+#include "hosthooks-def.h"

/* Yes, this is really supposed to work. */
static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096)));
@@ -75,3 +77,5 @@

return ret;
}
+
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
5 changes: 5 additions & 0 deletions scripts/002-gcc-newlib-PPU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ if [ ! -d ${GCC} ]; then
cat ../patches/${GCC}-PS3.patch | patch -p1 -d ${GCC}
cat ../patches/${NEWLIB}-PS3.patch | patch -p1 -d ${NEWLIB}

## Patch for macOS arm64
if [[ $(uname -s) == 'Darwin' && $(uname -m) == 'arm64' ]]; then
cat ../patches/${GCC}-PS3-macos-arm64.patch | patch -p1 -d ${GCC}
fi

## Enter the source code directory.
cd ${GCC}

Expand Down
8 changes: 4 additions & 4 deletions scripts/008-psl1ght.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/sh -e
# psl1ght.sh by Naomi Peori (naomi@peori.ca)

## Download the source code.
wget --no-check-certificate https://github.com/ps3dev/PSL1GHT/tarball/master -O psl1ght.tar.gz

## Check if we want to skip this step
if [[ -n "$BUILD_PS3TOOLCHAIN_ONLY" ]]; then
if [ -n "$BUILD_PS3TOOLCHAIN_ONLY" ]; then
echo "PS3 Toolchain only set. Skipping..."
exit 0
fi

## Download the source code.
wget --no-check-certificate https://github.com/ps3dev/PSL1GHT/tarball/master -O psl1ght.tar.gz

## Unpack the source code.
rm -Rf psl1ght && mkdir psl1ght && tar --strip-components=1 --directory=psl1ght -xvzf psl1ght.tar.gz

Expand Down
8 changes: 4 additions & 4 deletions scripts/009-ps3libraries.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/sh -e
# ps3libraries.sh by Naomi Peori (naomi@peori.ca)

## Download the source code.
wget --no-check-certificate https://github.com/ps3dev/ps3libraries/tarball/master -O ps3libraries.tar.gz

## Check if we want to skip this step
if [[ -n "$BUILD_PS3TOOLCHAIN_ONLY" ]]; then
if [ -n "$BUILD_PS3TOOLCHAIN_ONLY" ]; then
echo "PS3 Toolchain only set. Skipping..."
exit 0
fi

## Download the source code.
wget --no-check-certificate https://github.com/ps3dev/ps3libraries/tarball/master -O ps3libraries.tar.gz

## Unpack the source code.
rm -Rf ps3libraries && mkdir ps3libraries && tar --strip-components=1 --directory=ps3libraries -xvzf ps3libraries.tar.gz && cd ps3libraries

Expand Down
Loading