From e64ac0e9308a7cdb06ce5c518e0db2e30f88a38f Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 16:47:13 +0100 Subject: [PATCH 01/48] chore(ci): i386 and PowerPC Mac OS crossbuilds --- .github/workflows/build-macos.yml | 76 ++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 160f696fd..868b266a9 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -4,7 +4,7 @@ on: workflow_call: jobs: - build-appkit-macos: + build-appkit-macos-modern: name: Build (AppKit ${{ matrix.label }}) strategy: fail-fast: false @@ -56,3 +56,77 @@ jobs: with: name: butterscotch-appkit-macos-${{ matrix.label }} path: build/butterscotch + + build-appkit-macos-cross: + name: Build (AppKit ${{ matrix.arch }}) + strategy: + fail-fast: false + matrix: + include: + - arch: i386 + cflags: "-march=yonah" + - arch: powerpc + cflags: "" + + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + + - name: Get commit info + id: commit-info + run: | + echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y clang cmake ccache libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip cpio zlib1g-dev + + - name: Cache OSXCross toolchain + id: cache-osxcross + uses: actions/cache@v4 + with: + path: osxcross + key: osxcross-${{ matrix.arch }}-v1 + + - name: Checkout OSXCross + if: steps.cache-osxcross.outputs.cache-hit != 'true' + uses: actions/checkout@v7 + with: + repository: tpoechtrager/osxcross + ref: 27d21e4977c9751d01199c7a226a6faf494c3dd9 + path: vendor/osxcross + + - name: Download Mac OS X SDK + if: steps.cache-osxcross.outputs.cache-hit != 'true' + run: | + curl -L -o vendor/osxcross/tarballs/MacOSX10.4u.sdk.tar.xz https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.4u.sdk.tar.xz + + - name: Build OSXCross toolchain + if: steps.cache-osxcross.outputs.cache-hit != 'true' + env: + UNATTENDED: "1" + run: | + cd vendor/osxcross + ./build.sh + + - name: Configure and build Butterscotch + env: + PATH: ${{ github.workspace }}/vendor/osxcross/target/bin:${{ env.PATH }} + CC: ${{ matrix.arch }}-apple-darwin8-clang + CFLAGS: ${{ matrix.cflags }} + run: | + cmake -B build -G Ninja \ + -DWERROR=ON \ + -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" \ + -DBACKEND=appkit \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_BUILD_TYPE=Release + cmake --build build + + - name: Upload artifact + uses: actions/upload-artifact@v7 + with: + name: butterscotch-appkit-macos-${{ matrix.label }} + path: build/butterscotch \ No newline at end of file From 07d5b0cbb776aaeab2cf15f880b3f701108e5177 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 16:47:54 +0100 Subject: [PATCH 02/48] correct label --- .github/workflows/build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 868b266a9..caa5988ac 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -128,5 +128,5 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v7 with: - name: butterscotch-appkit-macos-${{ matrix.label }} + name: butterscotch-appkit-macos-${{ matrix.arch }} path: build/butterscotch \ No newline at end of file From b2f6da56774e63629b3e11191d247bde2b434edf Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 16:49:38 +0100 Subject: [PATCH 03/48] osxcross-1.1 --- .github/workflows/build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index caa5988ac..6f9202a5b 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -94,7 +94,7 @@ jobs: uses: actions/checkout@v7 with: repository: tpoechtrager/osxcross - ref: 27d21e4977c9751d01199c7a226a6faf494c3dd9 + ref: osxcross-1.1 path: vendor/osxcross - name: Download Mac OS X SDK From d972683006b1bfb11643575cb8f45f6d9372eb59 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 16:54:16 +0100 Subject: [PATCH 04/48] ok at least the toolchain built --- .github/workflows/build-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 6f9202a5b..cbb49bbf4 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -80,7 +80,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y clang cmake ccache libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip cpio zlib1g-dev + sudo apt-get install -y clang cmake ninja-build ccache libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip cpio zlib1g-dev - name: Cache OSXCross toolchain id: cache-osxcross @@ -112,7 +112,7 @@ jobs: - name: Configure and build Butterscotch env: - PATH: ${{ github.workspace }}/vendor/osxcross/target/bin:${{ env.PATH }} + PATH: ${{ github.workspace }}/vendor/osxcross/target/bin:$PATH CC: ${{ matrix.arch }}-apple-darwin8-clang CFLAGS: ${{ matrix.cflags }} run: | From 2b9ea70cdecde35cf6b0e212f262f210f4451078 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 16:57:47 +0100 Subject: [PATCH 05/48] try it this way? --- .github/workflows/build-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index cbb49bbf4..43cc90d2d 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -84,7 +84,7 @@ jobs: - name: Cache OSXCross toolchain id: cache-osxcross - uses: actions/cache@v4 + uses: actions/cache@v6 with: path: osxcross key: osxcross-${{ matrix.arch }}-v1 @@ -112,10 +112,10 @@ jobs: - name: Configure and build Butterscotch env: - PATH: ${{ github.workspace }}/vendor/osxcross/target/bin:$PATH CC: ${{ matrix.arch }}-apple-darwin8-clang CFLAGS: ${{ matrix.cflags }} run: | + export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cmake -B build -G Ninja \ -DWERROR=ON \ -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" \ From 0b0ba87d287eb49b98acd86fb65410bf6c7f27cc Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:06:20 +0100 Subject: [PATCH 06/48] SDL 1.2 --- .github/workflows/build-macos.yml | 36 +++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 43cc90d2d..d8742b344 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -58,7 +58,7 @@ jobs: path: build/butterscotch build-appkit-macos-cross: - name: Build (AppKit ${{ matrix.arch }}) + name: Build (SDL 1.2 ${{ matrix.arch }}) strategy: fail-fast: false matrix: @@ -82,11 +82,13 @@ jobs: sudo apt-get update sudo apt-get install -y clang cmake ninja-build ccache libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip cpio zlib1g-dev - - name: Cache OSXCross toolchain + - name: Cache OSXCross toolchain and SDL 1.2 id: cache-osxcross uses: actions/cache@v6 with: - path: osxcross + path: | + vendor/osxcross + vendor/SDL key: osxcross-${{ matrix.arch }}-v1 - name: Checkout OSXCross @@ -96,7 +98,7 @@ jobs: repository: tpoechtrager/osxcross ref: osxcross-1.1 path: vendor/osxcross - + - name: Download Mac OS X SDK if: steps.cache-osxcross.outputs.cache-hit != 'true' run: | @@ -109,7 +111,26 @@ jobs: run: | cd vendor/osxcross ./build.sh - + + - name: Checkout SDL 1.2 + if: steps.cache-osxcross.outputs.cache-hit != 'true' + uses: actions/checkout@v7 + with: + repository: libsdl-org/SDL-1.2 + ref: a1f09d7b03a0e1c49f7c91b521fce3cccd6fff6e + path: vendor/SDL + + - name: Build SDL 1.2 + if: steps.cache-osxcross.outputs.cache-hit != 'true' + run: | + cd vendor/SDL + ./configure \ + --host=${{ matrix.arch }}-apple-darwin8 \ + --prefix=${{ github.workspace }}/vendor/osxcross/target \ + --disable-shared + make -j$(nproc) + make install + - name: Configure and build Butterscotch env: CC: ${{ matrix.arch }}-apple-darwin8-clang @@ -119,7 +140,8 @@ jobs: cmake -B build -G Ninja \ -DWERROR=ON \ -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" \ - -DBACKEND=appkit \ + -DBACKEND=sdl1 \ + -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=Release @@ -128,5 +150,5 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v7 with: - name: butterscotch-appkit-macos-${{ matrix.arch }} + name: butterscotch-sdl-macos-${{ matrix.arch }} path: build/butterscotch \ No newline at end of file From 466cb090c578214b37750bfdde372aa66dbcfeab Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:07:52 +0100 Subject: [PATCH 07/48] no need to cache sdl dir --- .github/workflows/build-macos.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index d8742b344..528ab96dc 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -82,13 +82,11 @@ jobs: sudo apt-get update sudo apt-get install -y clang cmake ninja-build ccache libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip cpio zlib1g-dev - - name: Cache OSXCross toolchain and SDL 1.2 + - name: Cache OSXCross toolchain id: cache-osxcross uses: actions/cache@v6 with: - path: | - vendor/osxcross - vendor/SDL + path: vendor/osxcross key: osxcross-${{ matrix.arch }}-v1 - name: Checkout OSXCross From c0cabf5832653b8de4eb913fc2b76a69595ad8d3 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:12:11 +0100 Subject: [PATCH 08/48] path of pain --- .github/workflows/build-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 528ab96dc..caa30a4bd 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -121,6 +121,7 @@ jobs: - name: Build SDL 1.2 if: steps.cache-osxcross.outputs.cache-hit != 'true' run: | + export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cd vendor/SDL ./configure \ --host=${{ matrix.arch }}-apple-darwin8 \ From 6d1ff602ef43e05d03297846dd98f26fe2a5a2fe Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:16:28 +0100 Subject: [PATCH 09/48] global CC --- .github/workflows/build-macos.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index caa30a4bd..737e40d3c 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -67,6 +67,9 @@ jobs: cflags: "-march=yonah" - arch: powerpc cflags: "" + env: + CC: ${{ matrix.arch }}-apple-darwin8-clang + CFLAGS: ${{ matrix.cflags }} runs-on: ubuntu-24.04 steps: @@ -131,9 +134,6 @@ jobs: make install - name: Configure and build Butterscotch - env: - CC: ${{ matrix.arch }}-apple-darwin8-clang - CFLAGS: ${{ matrix.cflags }} run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cmake -B build -G Ninja \ From 7ba127a1bc047319a6c89ae56ab8da510e3d63e9 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:17:21 +0100 Subject: [PATCH 10/48] no --- .github/workflows/build-macos.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 737e40d3c..17a259eb2 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -67,9 +67,6 @@ jobs: cflags: "-march=yonah" - arch: powerpc cflags: "" - env: - CC: ${{ matrix.arch }}-apple-darwin8-clang - CFLAGS: ${{ matrix.cflags }} runs-on: ubuntu-24.04 steps: @@ -123,6 +120,9 @@ jobs: - name: Build SDL 1.2 if: steps.cache-osxcross.outputs.cache-hit != 'true' + env: + CC: ${{ matrix.arch }}-apple-darwin8-clang + CFLAGS: ${{ matrix.cflags }} run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cd vendor/SDL @@ -134,6 +134,9 @@ jobs: make install - name: Configure and build Butterscotch + env: + CC: ${{ matrix.arch }}-apple-darwin8-clang + CFLAGS: ${{ matrix.cflags }} run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cmake -B build -G Ninja \ From 7291589f5fd94534c10b89713296daf9329a9a89 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:21:38 +0100 Subject: [PATCH 11/48] what --- .github/workflows/build-macos.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 17a259eb2..9ed5e89e3 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -64,8 +64,10 @@ jobs: matrix: include: - arch: i386 + clang_arch: i386 cflags: "-march=yonah" - arch: powerpc + clang_arch: ppc cflags: "" runs-on: ubuntu-24.04 @@ -122,21 +124,21 @@ jobs: if: steps.cache-osxcross.outputs.cache-hit != 'true' env: CC: ${{ matrix.arch }}-apple-darwin8-clang - CFLAGS: ${{ matrix.cflags }} + CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.clang_arch }}" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cd vendor/SDL ./configure \ --host=${{ matrix.arch }}-apple-darwin8 \ --prefix=${{ github.workspace }}/vendor/osxcross/target \ - --disable-shared + --disable-shared || cat config.log make -j$(nproc) make install - name: Configure and build Butterscotch env: CC: ${{ matrix.arch }}-apple-darwin8-clang - CFLAGS: ${{ matrix.cflags }} + CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.clang_arch }}" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cmake -B build -G Ninja \ From 9a1af6fc7d5b9a769312866fba6e0f0471aa5592 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:28:20 +0100 Subject: [PATCH 12/48] johnny b. goode --- .github/workflows/build-macos.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 9ed5e89e3..46d586a97 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -64,10 +64,8 @@ jobs: matrix: include: - arch: i386 - clang_arch: i386 cflags: "-march=yonah" - - arch: powerpc - clang_arch: ppc + - arch: ppc cflags: "" runs-on: ubuntu-24.04 @@ -124,7 +122,7 @@ jobs: if: steps.cache-osxcross.outputs.cache-hit != 'true' env: CC: ${{ matrix.arch }}-apple-darwin8-clang - CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.clang_arch }}" + CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.arch }}" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cd vendor/SDL @@ -146,6 +144,8 @@ jobs: -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" \ -DBACKEND=sdl1 \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ + -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ + -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=Release From d05a1854434d4fe6b33afd1968e90ca13b071372 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:29:35 +0100 Subject: [PATCH 13/48] openal? --- .github/workflows/build-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 46d586a97..9ad927103 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -143,6 +143,7 @@ jobs: -DWERROR=ON \ -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" \ -DBACKEND=sdl1 \ + -DAUDIO_BACKEND=openal \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ From d6821aba2f50d7fe508bc5b835e23e43a398f7fc Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:33:50 +0100 Subject: [PATCH 14/48] cmon, do something --- .github/workflows/build-macos.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 9ad927103..0927d861b 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -121,7 +121,7 @@ jobs: - name: Build SDL 1.2 if: steps.cache-osxcross.outputs.cache-hit != 'true' env: - CC: ${{ matrix.arch }}-apple-darwin8-clang + CC: o32-clang CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.arch }}" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" @@ -135,10 +135,12 @@ jobs: - name: Configure and build Butterscotch env: - CC: ${{ matrix.arch }}-apple-darwin8-clang - CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.clang_arch }}" + CC: o32-clang + CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.arch }}" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" + export SDK_FRAMEWORKS="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/System/Library/Frameworks" + cmake -B build -G Ninja \ -DWERROR=ON \ -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" \ @@ -147,6 +149,8 @@ jobs: -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ + -DOPENAL_LIBRARY="${SDK_FRAMEWORKS}/OpenAL.framework" \ + -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=Release From 3215489189920af542c8e760677b5556d32b6693 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:43:56 +0100 Subject: [PATCH 15/48] right --- .github/workflows/build-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 0927d861b..ae066d27d 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -65,7 +65,7 @@ jobs: include: - arch: i386 cflags: "-march=yonah" - - arch: ppc + - arch: powerpc cflags: "" runs-on: ubuntu-24.04 @@ -143,7 +143,7 @@ jobs: cmake -B build -G Ninja \ -DWERROR=ON \ - -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" \ + -DCMAKE_C_FLAGS="-Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ -DBACKEND=sdl1 \ -DAUDIO_BACKEND=openal \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ From ed47981e7de94330aea135bb7a0d0d7da34f497a Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:49:14 +0100 Subject: [PATCH 16/48] what the fuck is wrong with i386 --- .github/workflows/build-macos.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index ae066d27d..adbe7e2e7 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -64,8 +64,10 @@ jobs: matrix: include: - arch: i386 + clang_arch: i386 cflags: "-march=yonah" - arch: powerpc + clang_arch: ppc cflags: "" runs-on: ubuntu-24.04 @@ -122,7 +124,7 @@ jobs: if: steps.cache-osxcross.outputs.cache-hit != 'true' env: CC: o32-clang - CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.arch }}" + CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.clang_arch }}" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cd vendor/SDL @@ -136,25 +138,28 @@ jobs: - name: Configure and build Butterscotch env: CC: o32-clang - CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.arch }}" + CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.arch }} -mmacosx-version-min=10.4" + LDFLAGS: "-arch ${{ matrix.arch }} -mmacosx-version-min=10.4" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" - export SDK_FRAMEWORKS="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/System/Library/Frameworks" + + SDK_FRAMEWORKS="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/System/Library/Frameworks" cmake -B build -G Ninja \ -DWERROR=ON \ -DCMAKE_C_FLAGS="-Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ + -DCMAKE_EXE_LINKER_FLAGS="-framework OpenAL -framework Cocoa -framework Carbon" \ -DBACKEND=sdl1 \ -DAUDIO_BACKEND=openal \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ - -DOPENAL_LIBRARY="${SDK_FRAMEWORKS}/OpenAL.framework" \ + -DOPENAL_LIBRARY="-framework OpenAL" \ -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=Release - cmake --build build + cmake --build build --verbose - name: Upload artifact uses: actions/upload-artifact@v7 From 341a06cd0cb26958223d12063852042dff0787e2 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 17:55:24 +0100 Subject: [PATCH 17/48] sacrifice --- .github/workflows/build-macos.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index adbe7e2e7..4f8cab38a 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -66,9 +66,7 @@ jobs: - arch: i386 clang_arch: i386 cflags: "-march=yonah" - - arch: powerpc - clang_arch: ppc - cflags: "" + # osxcross Date: Sun, 23 Aug 2026 17:59:12 +0100 Subject: [PATCH 18/48] skip rpath --- .github/workflows/build-macos.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 4f8cab38a..ab9db7315 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -143,9 +143,10 @@ jobs: cmake -B build -G Ninja \ -DWERROR=ON \ - -DCMAKE_C_FLAGS="-Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ -DBACKEND=sdl1 \ -DAUDIO_BACKEND=openal \ + -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_C_FLAGS="-Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ From 4b1c72d4c31caab3d65cde817951a559b0cfadb9 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 18:02:51 +0100 Subject: [PATCH 19/48] ar and ranlib --- .github/workflows/build-macos.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index ab9db7315..2369eb45f 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -146,6 +146,8 @@ jobs: -DBACKEND=sdl1 \ -DAUDIO_BACKEND=openal \ -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_AR="${{ github.workspace }}/vendor/osxcross/target/bin/o32-ar" \ + -DCMAKE_RANLIB="${{ github.workspace }}/vendor/osxcross/target/bin/o32-ranlib" \ -DCMAKE_C_FLAGS="-Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ From aa6dd9d39d2bdde4feb618f2ec5c1a66819c2a7e Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 18:07:21 +0100 Subject: [PATCH 20/48] why is it crashing --- .github/workflows/build-macos.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 2369eb45f..689036b00 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -136,7 +136,7 @@ jobs: - name: Configure and build Butterscotch env: CC: o32-clang - CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.arch }}" + CFLAGS: "-O2 -arch ${{ matrix.clang_arch }} ${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" SDK_FRAMEWORKS="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/System/Library/Frameworks" @@ -145,18 +145,18 @@ jobs: -DWERROR=ON \ -DBACKEND=sdl1 \ -DAUDIO_BACKEND=openal \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_AR="${{ github.workspace }}/vendor/osxcross/target/bin/o32-ar" \ -DCMAKE_RANLIB="${{ github.workspace }}/vendor/osxcross/target/bin/o32-ranlib" \ - -DCMAKE_C_FLAGS="-Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ + -DCMAKE_C_FLAGS="${{ env.CFLAGS }}" \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ -DOPENAL_LIBRARY="${SDK_FRAMEWORKS}/OpenAL.framework/OpenAL" \ -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_BUILD_TYPE=Release + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache cmake --build build --verbose - name: Upload artifact From d5393eb35866e7d1100fb1c33f21fd87414ca92e Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 18:15:16 +0100 Subject: [PATCH 21/48] gnu make --- .github/workflows/build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 689036b00..26a53e333 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -141,7 +141,7 @@ jobs: export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" SDK_FRAMEWORKS="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/System/Library/Frameworks" - cmake -B build -G Ninja \ + cmake -B build \ -DWERROR=ON \ -DBACKEND=sdl1 \ -DAUDIO_BACKEND=openal \ From 3aac325174dd59364275d52e1458ca7c5d3cd7a9 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 18:20:14 +0100 Subject: [PATCH 22/48] ar doesn't exist? --- .github/workflows/build-macos.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 26a53e333..75ce6abd9 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -147,8 +147,8 @@ jobs: -DAUDIO_BACKEND=openal \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ - -DCMAKE_AR="${{ github.workspace }}/vendor/osxcross/target/bin/o32-ar" \ - -DCMAKE_RANLIB="${{ github.workspace }}/vendor/osxcross/target/bin/o32-ranlib" \ + -DCMAKE_AR="${{ matrix.arch }}-apple-darwin8-ar" \ + -DCMAKE_RANLIB="${{ matrix.arch }}-apple-darwin8-ranlib" \ -DCMAKE_C_FLAGS="${{ env.CFLAGS }}" \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ @@ -157,7 +157,7 @@ jobs: -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - cmake --build build --verbose + cmake --build build --verbose -- -j$(nproc) - name: Upload artifact uses: actions/upload-artifact@v7 From 843744b09ba28a3a621fb9bc3e2024f53fb810e9 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 18:24:04 +0100 Subject: [PATCH 23/48] ok then --- .github/workflows/build-macos.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 75ce6abd9..76132e83f 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -136,12 +136,12 @@ jobs: - name: Configure and build Butterscotch env: CC: o32-clang - CFLAGS: "-O2 -arch ${{ matrix.clang_arch }} ${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" + CFLAGS: "${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" SDK_FRAMEWORKS="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/System/Library/Frameworks" - cmake -B build \ + cmake -B build -G Ninja \ -DWERROR=ON \ -DBACKEND=sdl1 \ -DAUDIO_BACKEND=openal \ @@ -150,6 +150,7 @@ jobs: -DCMAKE_AR="${{ matrix.arch }}-apple-darwin8-ar" \ -DCMAKE_RANLIB="${{ matrix.arch }}-apple-darwin8-ranlib" \ -DCMAKE_C_FLAGS="${{ env.CFLAGS }}" \ + -DCMAKE_EXE_LINKER_FLAGS="-framework Cocoa -framework Carbon -framework IOKit -framework AppKit" -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ @@ -157,7 +158,7 @@ jobs: -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - cmake --build build --verbose -- -j$(nproc) + cmake --build build - name: Upload artifact uses: actions/upload-artifact@v7 From 880c2a63592df7a4b5c33df7ce34ae4956da6df1 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 18:37:33 +0100 Subject: [PATCH 24/48] insanity --- .github/workflows/build-macos.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 76132e83f..a62f13232 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -136,7 +136,6 @@ jobs: - name: Configure and build Butterscotch env: CC: o32-clang - CFLAGS: "${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" SDK_FRAMEWORKS="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/System/Library/Frameworks" @@ -149,7 +148,7 @@ jobs: -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_AR="${{ matrix.arch }}-apple-darwin8-ar" \ -DCMAKE_RANLIB="${{ matrix.arch }}-apple-darwin8-ranlib" \ - -DCMAKE_C_FLAGS="${{ env.CFLAGS }}" \ + -DCMAKE_C_FLAGS=""${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include"" \ -DCMAKE_EXE_LINKER_FLAGS="-framework Cocoa -framework Carbon -framework IOKit -framework AppKit" -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ From c05f538e8db262f8fc5318d59707d022129b5209 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 18:38:18 +0100 Subject: [PATCH 25/48] rm --- .github/workflows/build-macos.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index a62f13232..b9eb31503 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -149,7 +149,6 @@ jobs: -DCMAKE_AR="${{ matrix.arch }}-apple-darwin8-ar" \ -DCMAKE_RANLIB="${{ matrix.arch }}-apple-darwin8-ranlib" \ -DCMAKE_C_FLAGS=""${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include"" \ - -DCMAKE_EXE_LINKER_FLAGS="-framework Cocoa -framework Carbon -framework IOKit -framework AppKit" -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ From fa2d90995707840173d5dac221fd2ea05178d093 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 18:41:39 +0100 Subject: [PATCH 26/48] what --- .github/workflows/build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index b9eb31503..3e550d481 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -148,7 +148,7 @@ jobs: -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_AR="${{ matrix.arch }}-apple-darwin8-ar" \ -DCMAKE_RANLIB="${{ matrix.arch }}-apple-darwin8-ranlib" \ - -DCMAKE_C_FLAGS=""${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include"" \ + -DCMAKE_C_FLAGS="${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ From 6d415ac00d81ea4f5eaeddf0f8294081ce00f320 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 18:55:28 +0100 Subject: [PATCH 27/48] try this --- .github/workflows/build-macos.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 3e550d481..decc371f6 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -139,7 +139,9 @@ jobs: run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" SDK_FRAMEWORKS="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/System/Library/Frameworks" - + SDK_USR_LIB="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/usr/lib" + ACC_REMAP="/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate:${SDK_FRAMEWORKS}/vecLib.framework/Versions/A/vecLib" + cmake -B build -G Ninja \ -DWERROR=ON \ -DBACKEND=sdl1 \ @@ -149,6 +151,7 @@ jobs: -DCMAKE_AR="${{ matrix.arch }}-apple-darwin8-ar" \ -DCMAKE_RANLIB="${{ matrix.arch }}-apple-darwin8-ranlib" \ -DCMAKE_C_FLAGS="${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ + -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ From 902bebc5448241d129ff08f026f85cbe025bfc10 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:01:35 +0100 Subject: [PATCH 28/48] warm cache test From c099733dab435795915c75a5414b18248579d58d Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:02:46 +0100 Subject: [PATCH 29/48] ccache --- .github/workflows/build-macos.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index decc371f6..b48352a58 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -82,11 +82,13 @@ jobs: sudo apt-get update sudo apt-get install -y clang cmake ninja-build ccache libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip cpio zlib1g-dev - - name: Cache OSXCross toolchain + - name: Cache OSXCross toolchain and ccache id: cache-osxcross uses: actions/cache@v6 with: - path: vendor/osxcross + path: | + vendor/osxcross + ~/.cache/ccache key: osxcross-${{ matrix.arch }}-v1 - name: Checkout OSXCross From d2648286425870225475faba613bf4edbe292e4e Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:05:24 +0100 Subject: [PATCH 30/48] warm cache test #2 From e5f92941d78fc831c8ed702ea0b813a359abe4c7 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:20:51 +0100 Subject: [PATCH 31/48] powerpc round 2 baby --- .github/workflows/build-macos.yml | 87 ++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index b48352a58..df94368ac 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -64,11 +64,26 @@ jobs: matrix: include: - arch: i386 - clang_arch: i386 + cc: o32-clang + ar: i386-apple-darwin8-ar + ranlib: i386-apple-darwin8-ranlib cflags: "-march=yonah" - # osxcross > $GITHUB_OUTPUT - - name: Install dependencies + - name: Install dependencies (Host) + if: matrix.arch == 'i386' run: | sudo apt-get update sudo apt-get install -y clang cmake ninja-build ccache libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip cpio zlib1g-dev - - name: Cache OSXCross toolchain and ccache - id: cache-osxcross + - name: Install build tools (Container) + if: matrix.arch == 'powerpc' + run: | + apt-get update && apt-get install -y cmake ninja-build ccache || true + + - name: Cache Intel OSXCross and ccache + if: matrix.arch == 'i386' + id: cache-intel uses: actions/cache@v6 with: path: | vendor/osxcross ~/.cache/ccache key: osxcross-${{ matrix.arch }}-v1 + + - name: Cache PowerPC SDL and ccache + if: matrix.arch == 'powerpc' + id: cache-ppc + uses: actions/cache@v6 + with: + path: | + ${{ github.workspace }}/vendor/sdl_ppc + ~/.cache/ccache + key: sdl-ppc-${{ matrix.arch }}-v1 - name: Checkout OSXCross - if: steps.cache-osxcross.outputs.cache-hit != 'true' + if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' uses: actions/checkout@v7 with: repository: tpoechtrager/osxcross @@ -100,12 +132,12 @@ jobs: path: vendor/osxcross - name: Download Mac OS X SDK - if: steps.cache-osxcross.outputs.cache-hit != 'true' + if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' run: | - curl -L -o vendor/osxcross/tarballs/MacOSX10.4u.sdk.tar.xz https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.4u.sdk.tar.xz + curl -L -o vendor/osxcross/tarballs/MacOSX10.4u.sdk.tar.xz https://github.com - name: Build OSXCross toolchain - if: steps.cache-osxcross.outputs.cache-hit != 'true' + if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' env: UNATTENDED: "1" run: | @@ -113,7 +145,9 @@ jobs: ./build.sh - name: Checkout SDL 1.2 - if: steps.cache-osxcross.outputs.cache-hit != 'true' + if: | + (matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true') || + (matrix.arch == 'powerpc' && steps.cache-ppc.outputs.cache-hit != 'true') uses: actions/checkout@v7 with: repository: libsdl-org/SDL-1.2 @@ -121,27 +155,29 @@ jobs: path: vendor/SDL - name: Build SDL 1.2 - if: steps.cache-osxcross.outputs.cache-hit != 'true' + if: | + (matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true') || + (matrix.arch == 'powerpc' && steps.cache-ppc.outputs.cache-hit != 'true') env: - CC: o32-clang - CFLAGS: "${{ matrix.cflags }} -arch ${{ matrix.clang_arch }}" + CC: ${{ matrix.cc }} + CFLAGS: "${{ matrix.cflags }}" run: | - export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" + export PATH="${{ matrix.target_prefix }}/bin:$PATH" cd vendor/SDL ./configure \ --host=${{ matrix.arch }}-apple-darwin8 \ - --prefix=${{ github.workspace }}/vendor/osxcross/target \ + --prefix=${{ matrix.sdl_prefix }} \ --disable-shared || cat config.log make -j$(nproc) make install - name: Configure and build Butterscotch env: - CC: o32-clang + CC: ${{ matrix.cc }} run: | - export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" - SDK_FRAMEWORKS="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/System/Library/Frameworks" - SDK_USR_LIB="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/usr/lib" + export PATH="${{ matrix.target_prefix }}/bin:$PATH" + SDK_FRAMEWORKS="${{ matrix.sdk_path }}/System/Library/Frameworks" + SDK_USR_LIB="${{ matrix.sdk_path }}/usr/lib" ACC_REMAP="/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate:${SDK_FRAMEWORKS}/vecLib.framework/Versions/A/vecLib" cmake -B build -G Ninja \ @@ -150,13 +186,14 @@ jobs: -DAUDIO_BACKEND=openal \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ - -DCMAKE_AR="${{ matrix.arch }}-apple-darwin8-ar" \ - -DCMAKE_RANLIB="${{ matrix.arch }}-apple-darwin8-ranlib" \ - -DCMAKE_C_FLAGS="${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ + -DCMAKE_C_COMPILER="${{ matrix.cc }}" \ + -DCMAKE_AR="${{ matrix.ar }}" \ + -DCMAKE_RANLIB="${{ matrix.ranlib }}" \ + -DCMAKE_C_FLAGS="${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ matrix.sdl_prefix }}/include" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ - -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ - -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ - -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ + -DCMAKE_PREFIX_PATH="${{ matrix.sdl_prefix }};${{ matrix.target_prefix }}" \ + -DCMAKE_FIND_ROOT_PATH="${{ matrix.sdl_prefix }};${{ matrix.target_prefix }}" \ + -DCMAKE_INCLUDE_PATH="${{ matrix.sdl_prefix }}/include" \ -DOPENAL_LIBRARY="${SDK_FRAMEWORKS}/OpenAL.framework/OpenAL" \ -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ From 046bcb0d4ff637e4b728849b19e2b79b6a6f7a99 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:25:18 +0100 Subject: [PATCH 32/48] ok --- .github/workflows/build-macos.yml | 294 +++++++++++++++--------------- 1 file changed, 147 insertions(+), 147 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index df94368ac..cd53c1bf1 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -58,150 +58,150 @@ jobs: path: build/butterscotch build-appkit-macos-cross: - name: Build (SDL 1.2 ${{ matrix.arch }}) - strategy: - fail-fast: false - matrix: - include: - - arch: i386 - cc: o32-clang - ar: i386-apple-darwin8-ar - ranlib: i386-apple-darwin8-ranlib - cflags: "-march=yonah" - target_prefix: "${{ github.workspace }}/vendor/osxcross/target" - sdk_path: "${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk" - sdl_prefix: "${{ github.workspace }}/vendor/osxcross/target" - - - arch: powerpc - docker: ghcr.io/variantxyz/gcc-powerpc-apple-darwin8:build-gcc-14.2-macosxsdk10.4u - cc: powerpc-apple-darwin8-gcc - ar: powerpc-apple-darwin8-ar - ranlib: powerpc-apple-darwin8-ranlib - cflags: "-march=G3" - target_prefix: "/usr/local" - sdk_path: "/usr/local/MacOSX10.4u.sdk" - sdl_prefix: "${{ github.workspace }}/vendor/sdl_ppc" - - runs-on: ubuntu-24.04 - container: ${{ matrix.docker }} - steps: - - uses: actions/checkout@v4 - - - name: Get commit info - id: commit-info - run: | - echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - - - name: Install dependencies (Host) - if: matrix.arch == 'i386' - run: | - sudo apt-get update - sudo apt-get install -y clang cmake ninja-build ccache libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip cpio zlib1g-dev - - - name: Install build tools (Container) - if: matrix.arch == 'powerpc' - run: | - apt-get update && apt-get install -y cmake ninja-build ccache || true - - - name: Cache Intel OSXCross and ccache - if: matrix.arch == 'i386' - id: cache-intel - uses: actions/cache@v6 - with: - path: | - vendor/osxcross - ~/.cache/ccache - key: osxcross-${{ matrix.arch }}-v1 - - - name: Cache PowerPC SDL and ccache - if: matrix.arch == 'powerpc' - id: cache-ppc - uses: actions/cache@v6 - with: - path: | - ${{ github.workspace }}/vendor/sdl_ppc - ~/.cache/ccache - key: sdl-ppc-${{ matrix.arch }}-v1 - - - name: Checkout OSXCross - if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' - uses: actions/checkout@v7 - with: - repository: tpoechtrager/osxcross - ref: osxcross-1.1 - path: vendor/osxcross - - - name: Download Mac OS X SDK - if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' - run: | - curl -L -o vendor/osxcross/tarballs/MacOSX10.4u.sdk.tar.xz https://github.com - - - name: Build OSXCross toolchain - if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' - env: - UNATTENDED: "1" - run: | - cd vendor/osxcross - ./build.sh - - - name: Checkout SDL 1.2 - if: | - (matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true') || - (matrix.arch == 'powerpc' && steps.cache-ppc.outputs.cache-hit != 'true') - uses: actions/checkout@v7 - with: - repository: libsdl-org/SDL-1.2 - ref: a1f09d7b03a0e1c49f7c91b521fce3cccd6fff6e - path: vendor/SDL - - - name: Build SDL 1.2 - if: | - (matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true') || - (matrix.arch == 'powerpc' && steps.cache-ppc.outputs.cache-hit != 'true') - env: - CC: ${{ matrix.cc }} - CFLAGS: "${{ matrix.cflags }}" - run: | - export PATH="${{ matrix.target_prefix }}/bin:$PATH" - cd vendor/SDL - ./configure \ - --host=${{ matrix.arch }}-apple-darwin8 \ - --prefix=${{ matrix.sdl_prefix }} \ - --disable-shared || cat config.log - make -j$(nproc) - make install - - - name: Configure and build Butterscotch - env: - CC: ${{ matrix.cc }} - run: | - export PATH="${{ matrix.target_prefix }}/bin:$PATH" - SDK_FRAMEWORKS="${{ matrix.sdk_path }}/System/Library/Frameworks" - SDK_USR_LIB="${{ matrix.sdk_path }}/usr/lib" - ACC_REMAP="/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate:${SDK_FRAMEWORKS}/vecLib.framework/Versions/A/vecLib" - - cmake -B build -G Ninja \ - -DWERROR=ON \ - -DBACKEND=sdl1 \ - -DAUDIO_BACKEND=openal \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_SKIP_RPATH=ON \ - -DCMAKE_C_COMPILER="${{ matrix.cc }}" \ - -DCMAKE_AR="${{ matrix.ar }}" \ - -DCMAKE_RANLIB="${{ matrix.ranlib }}" \ - -DCMAKE_C_FLAGS="${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ matrix.sdl_prefix }}/include" \ - -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ - -DCMAKE_PREFIX_PATH="${{ matrix.sdl_prefix }};${{ matrix.target_prefix }}" \ - -DCMAKE_FIND_ROOT_PATH="${{ matrix.sdl_prefix }};${{ matrix.target_prefix }}" \ - -DCMAKE_INCLUDE_PATH="${{ matrix.sdl_prefix }}/include" \ - -DOPENAL_LIBRARY="${SDK_FRAMEWORKS}/OpenAL.framework/OpenAL" \ - -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - cmake --build build - - - name: Upload artifact - uses: actions/upload-artifact@v7 - with: - name: butterscotch-sdl-macos-${{ matrix.arch }} - path: build/butterscotch \ No newline at end of file + name: Build (SDL 1.2 ${{ matrix.arch }}) + runs-on: ubuntu-24.04 + container: ${{ matrix.docker && fromJSON(format('{{\"image\":\"{0}\"}}', matrix.docker)) || null }} + strategy: + fail-fast: false + matrix: + include: + - arch: i386 + cc: o32-clang + ar: i386-apple-darwin8-ar + ranlib: i386-apple-darwin8-ranlib + cflags: "-march=yonah" + target_prefix: "${{ github.workspace }}/vendor/osxcross/target" + sdk_path: "${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk" + sdl_prefix: "${{ github.workspace }}/vendor/osxcross/target" + + - arch: powerpc + docker: ghcr.io/variantxyz/gcc-powerpc-apple-darwin8:build-gcc-14.2-macosxsdk10.4u + cc: powerpc-apple-darwin8-gcc + ar: powerpc-apple-darwin8-ar + ranlib: powerpc-apple-darwin8-ranlib + cflags: "-march=G3" + target_prefix: "/usr/local" + sdk_path: "/usr/local/MacOSX10.4u.sdk" + sdl_prefix: "${{ github.workspace }}/vendor/sdl_ppc" + + steps: + - uses: actions/checkout@v4 + + - name: Get commit info + id: commit-info + run: | + echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Install dependencies (Host) + if: matrix.arch == 'i386' + run: | + sudo apt-get update + sudo apt-get install -y clang cmake ninja-build ccache libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip cpio zlib1g-dev + + - name: Install build tools (Container) + if: matrix.arch == 'powerpc' + run: | + apt-get update && apt-get install -y cmake ninja-build ccache || true + + - name: Cache Intel OSXCross and ccache + if: matrix.arch == 'i386' + id: cache-intel + uses: actions/cache@v6 + with: + path: | + vendor/osxcross + ~/.cache/ccache + key: osxcross-${{ matrix.arch }}-v1 + + - name: Cache PowerPC SDL and ccache + if: matrix.arch == 'powerpc' + id: cache-ppc + uses: actions/cache@v6 + with: + path: | + ${{ github.workspace }}/vendor/sdl_ppc + ~/.cache/ccache + key: sdl-ppc-${{ matrix.arch }}-v1 + + - name: Checkout OSXCross + if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' + uses: actions/checkout@v7 + with: + repository: tpoechtrager/osxcross + ref: osxcross-1.1 + path: vendor/osxcross + + - name: Download Mac OS X SDK + if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' + run: | + curl -L -o vendor/osxcross/tarballs/MacOSX10.4u.sdk.tar.xz https://github.com + + - name: Build OSXCross toolchain + if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' + env: + UNATTENDED: "1" + run: | + cd vendor/osxcross + ./build.sh + + - name: Checkout SDL 1.2 + if: | + (matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true') || + (matrix.arch == 'powerpc' && steps.cache-ppc.outputs.cache-hit != 'true') + uses: actions/checkout@v7 + with: + repository: libsdl-org/SDL-1.2 + ref: a1f09d7b03a0e1c49f7c91b521fce3cccd6fff6e + path: vendor/SDL + + - name: Build SDL 1.2 + if: | + (matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true') || + (matrix.arch == 'powerpc' && steps.cache-ppc.outputs.cache-hit != 'true') + env: + CC: ${{ matrix.cc }} + CFLAGS: "${{ matrix.cflags }}" + run: | + export PATH="${{ matrix.target_prefix }}/bin:$PATH" + cd vendor/SDL + ./configure \ + --host=${{ matrix.arch }}-apple-darwin8 \ + --prefix=${{ matrix.sdl_prefix }} \ + --disable-shared || cat config.log + make -j$(nproc) + make install + + - name: Configure and build Butterscotch + env: + CC: ${{ matrix.cc }} + run: | + export PATH="${{ matrix.target_prefix }}/bin:$PATH" + SDK_FRAMEWORKS="${{ matrix.sdk_path }}/System/Library/Frameworks" + SDK_USR_LIB="${{ matrix.sdk_path }}/usr/lib" + ACC_REMAP="/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate:${SDK_FRAMEWORKS}/vecLib.framework/Versions/A/vecLib" + + cmake -B build -G Ninja \ + -DWERROR=ON \ + -DBACKEND=sdl1 \ + -DAUDIO_BACKEND=openal \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_C_COMPILER="${{ matrix.cc }}" \ + -DCMAKE_AR="${{ matrix.ar }}" \ + -DCMAKE_RANLIB="${{ matrix.ranlib }}" \ + -DCMAKE_C_FLAGS="${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ matrix.sdl_prefix }}/include" \ + -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ + -DCMAKE_PREFIX_PATH="${{ matrix.sdl_prefix }};${{ matrix.target_prefix }}" \ + -DCMAKE_FIND_ROOT_PATH="${{ matrix.sdl_prefix }};${{ matrix.target_prefix }}" \ + -DCMAKE_INCLUDE_PATH="${{ matrix.sdl_prefix }}/include" \ + -DOPENAL_LIBRARY="${SDK_FRAMEWORKS}/OpenAL.framework/OpenAL" \ + -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + cmake --build build + + - name: Upload artifact + uses: actions/upload-artifact@v7 + with: + name: butterscotch-sdl-macos-${{ matrix.arch }} + path: build/butterscotch \ No newline at end of file From a86324eb68752b7b64925b8d1a54dec540624626 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:26:10 +0100 Subject: [PATCH 33/48] dockers --- .github/workflows/build-macos.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index cd53c1bf1..fa338bfc4 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -60,7 +60,8 @@ jobs: build-appkit-macos-cross: name: Build (SDL 1.2 ${{ matrix.arch }}) runs-on: ubuntu-24.04 - container: ${{ matrix.docker && fromJSON(format('{{\"image\":\"{0}\"}}', matrix.docker)) || null }} + container: + image: ${{ matrix.docker || 'ubuntu-24.04' }} strategy: fail-fast: false matrix: From 94b7f42c77279823aaa010c836aa723155962bc9 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:27:12 +0100 Subject: [PATCH 34/48] what --- .github/workflows/build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index fa338bfc4..653c14a16 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -61,7 +61,7 @@ jobs: name: Build (SDL 1.2 ${{ matrix.arch }}) runs-on: ubuntu-24.04 container: - image: ${{ matrix.docker || 'ubuntu-24.04' }} + image: ${{ matrix.docker || 'ubuntu:24.04' }} strategy: fail-fast: false matrix: From f592afd82acaef22d653f7407b277811a4436add Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:30:34 +0100 Subject: [PATCH 35/48] just separate ppc and i386 --- .github/workflows/build-macos.yml | 188 ++++++++++++++++++------------ 1 file changed, 113 insertions(+), 75 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 653c14a16..a455f19c9 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -57,75 +57,33 @@ jobs: name: butterscotch-appkit-macos-${{ matrix.label }} path: build/butterscotch - build-appkit-macos-cross: - name: Build (SDL 1.2 ${{ matrix.arch }}) + build-appkit-macos-i386: + name: Build (SDL 1.2 i386) runs-on: ubuntu-24.04 - container: - image: ${{ matrix.docker || 'ubuntu:24.04' }} - strategy: - fail-fast: false - matrix: - include: - - arch: i386 - cc: o32-clang - ar: i386-apple-darwin8-ar - ranlib: i386-apple-darwin8-ranlib - cflags: "-march=yonah" - target_prefix: "${{ github.workspace }}/vendor/osxcross/target" - sdk_path: "${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk" - sdl_prefix: "${{ github.workspace }}/vendor/osxcross/target" - - - arch: powerpc - docker: ghcr.io/variantxyz/gcc-powerpc-apple-darwin8:build-gcc-14.2-macosxsdk10.4u - cc: powerpc-apple-darwin8-gcc - ar: powerpc-apple-darwin8-ar - ranlib: powerpc-apple-darwin8-ranlib - cflags: "-march=G3" - target_prefix: "/usr/local" - sdk_path: "/usr/local/MacOSX10.4u.sdk" - sdl_prefix: "${{ github.workspace }}/vendor/sdl_ppc" - steps: - uses: actions/checkout@v4 - + - name: Get commit info id: commit-info run: | echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - - name: Install dependencies (Host) - if: matrix.arch == 'i386' + - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y clang cmake ninja-build ccache libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip cpio zlib1g-dev - - name: Install build tools (Container) - if: matrix.arch == 'powerpc' - run: | - apt-get update && apt-get install -y cmake ninja-build ccache || true - - name: Cache Intel OSXCross and ccache - if: matrix.arch == 'i386' id: cache-intel uses: actions/cache@v6 with: path: | - vendor/osxcross - ~/.cache/ccache - key: osxcross-${{ matrix.arch }}-v1 - - - name: Cache PowerPC SDL and ccache - if: matrix.arch == 'powerpc' - id: cache-ppc - uses: actions/cache@v6 - with: - path: | - ${{ github.workspace }}/vendor/sdl_ppc - ~/.cache/ccache - key: sdl-ppc-${{ matrix.arch }}-v1 + vendor/osxcross + ~/.cache/ccache + key: osxcross-i386-v1 - name: Checkout OSXCross - if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' + if: steps.cache-intel.outputs.cache-hit != 'true' uses: actions/checkout@v7 with: repository: tpoechtrager/osxcross @@ -133,12 +91,12 @@ jobs: path: vendor/osxcross - name: Download Mac OS X SDK - if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' + if: steps.cache-intel.outputs.cache-hit != 'true' run: | curl -L -o vendor/osxcross/tarballs/MacOSX10.4u.sdk.tar.xz https://github.com - name: Build OSXCross toolchain - if: matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true' + if: steps.cache-intel.outputs.cache-hit != 'true' env: UNATTENDED: "1" run: | @@ -146,9 +104,91 @@ jobs: ./build.sh - name: Checkout SDL 1.2 - if: | - (matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true') || - (matrix.arch == 'powerpc' && steps.cache-ppc.outputs.cache-hit != 'true') + if: steps.cache-intel.outputs.cache-hit != 'true' + uses: actions/checkout@v7 + with: + repository: libsdl-org/SDL-1.2 + ref: a1f09d7b03a0e1c49f7c91b521fce3cccd6fff6e + path: vendor/SDL + + - name: Build SDL 1.2 + if: steps.cache-intel.outputs.cache-hit != 'true' + env: + CC: o32-clang + CFLAGS: "-march=yonah" + run: | + export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" + cd vendor/SDL + ./configure \ + --host=i386-apple-darwin8 \ + --prefix=${{ github.workspace }}/vendor/osxcross/target \ + --disable-shared || cat config.log + make -j$(nproc) + make install + + - name: Configure and build Butterscotch + env: + CC: o32-clang + run: | + export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" + SDK_FRAMEWORKS="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/System/Library/Frameworks" + SDK_USR_LIB="${{ github.workspace }}/vendor/osxcross/target/SDK/MacOSX10.4u.sdk/usr/lib" + ACC_REMAP="/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate:${SDK_FRAMEWORKS}/vecLib.framework/Versions/A/vecLib" + + cmake -B build -G Ninja \ + -DWERROR=ON \ + -DBACKEND=sdl1 \ + -DAUDIO_BACKEND=openal \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_C_COMPILER="o32-clang" \ + -DCMAKE_AR="i386-apple-darwin8-ar" \ + -DCMAKE_RANLIB="i386-apple-darwin8-ranlib" \ + -DCMAKE_C_FLAGS="-march=yonah -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ + -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ + -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ + -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ + -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/osxcross/target/include" \ + -DOPENAL_LIBRARY="${SDK_FRAMEWORKS}/OpenAL.framework/OpenAL" \ + -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + cmake --build build + + - name: Upload artifact + uses: actions/upload-artifact@v7 + with: + name: butterscotch-sdl-macos-i386 + path: build/butterscotch + + build-appkit-macos-powerpc: + name: Build (SDL 1.2 powerpc) + runs-on: ubuntu-24.04 + container: + image: ghcr.io/variantxyz/gcc-powerpc-apple-darwin8:build-gcc-14.2-macosxsdk10.4u + steps: + - uses: actions/checkout@v4 + + - name: Get commit info + id: commit-info + run: | + echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Install build tools + run: | + apt-get update && apt-get install -y cmake ninja-build ccache || true + + - name: Cache PowerPC SDL and ccache + id: cache-ppc + uses: actions/cache@v6 + with: + path: | + ${{ github.workspace }}/vendor/sdl_ppc + ~/.cache/ccache + key: sdl-ppc-powerpc-v1 + + - name: Checkout SDL 1.2 + if: steps.cache-ppc.outputs.cache-hit != 'true' uses: actions/checkout@v7 with: repository: libsdl-org/SDL-1.2 @@ -156,29 +196,27 @@ jobs: path: vendor/SDL - name: Build SDL 1.2 - if: | - (matrix.arch == 'i386' && steps.cache-intel.outputs.cache-hit != 'true') || - (matrix.arch == 'powerpc' && steps.cache-ppc.outputs.cache-hit != 'true') + if: steps.cache-ppc.outputs.cache-hit != 'true' env: - CC: ${{ matrix.cc }} - CFLAGS: "${{ matrix.cflags }}" + CC: powerpc-apple-darwin8-gcc + CFLAGS: "-march=G3" run: | - export PATH="${{ matrix.target_prefix }}/bin:$PATH" + export PATH="/usr/local/bin:$PATH" cd vendor/SDL ./configure \ - --host=${{ matrix.arch }}-apple-darwin8 \ - --prefix=${{ matrix.sdl_prefix }} \ + --host=powerpc-apple-darwin8 \ + --prefix=${{ github.workspace }}/vendor/sdl_ppc \ --disable-shared || cat config.log make -j$(nproc) make install - name: Configure and build Butterscotch env: - CC: ${{ matrix.cc }} + CC: powerpc-apple-darwin8-gcc run: | - export PATH="${{ matrix.target_prefix }}/bin:$PATH" - SDK_FRAMEWORKS="${{ matrix.sdk_path }}/System/Library/Frameworks" - SDK_USR_LIB="${{ matrix.sdk_path }}/usr/lib" + export PATH="/usr/local/bin:$PATH" + SDK_FRAMEWORKS="/usr/local/MacOSX10.4u.sdk/System/Library/Frameworks" + SDK_USR_LIB="/usr/local/MacOSX10.4u.sdk/usr/lib" ACC_REMAP="/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate:${SDK_FRAMEWORKS}/vecLib.framework/Versions/A/vecLib" cmake -B build -G Ninja \ @@ -187,14 +225,14 @@ jobs: -DAUDIO_BACKEND=openal \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ - -DCMAKE_C_COMPILER="${{ matrix.cc }}" \ - -DCMAKE_AR="${{ matrix.ar }}" \ - -DCMAKE_RANLIB="${{ matrix.ranlib }}" \ - -DCMAKE_C_FLAGS="${{ matrix.cflags }} -Wno-deprecated-declarations -I${{ matrix.sdl_prefix }}/include" \ + -DCMAKE_C_COMPILER="powerpc-apple-darwin8-gcc" \ + -DCMAKE_AR="powerpc-apple-darwin8-ar" \ + -DCMAKE_RANLIB="powerpc-apple-darwin8-ranlib" \ + -DCMAKE_C_FLAGS="-march=G3 -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/sdl_ppc/include" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ - -DCMAKE_PREFIX_PATH="${{ matrix.sdl_prefix }};${{ matrix.target_prefix }}" \ - -DCMAKE_FIND_ROOT_PATH="${{ matrix.sdl_prefix }};${{ matrix.target_prefix }}" \ - -DCMAKE_INCLUDE_PATH="${{ matrix.sdl_prefix }}/include" \ + -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/sdl_ppc;/usr/local" \ + -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/sdl_ppc;/usr/local" \ + -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/sdl_ppc/include" \ -DOPENAL_LIBRARY="${SDK_FRAMEWORKS}/OpenAL.framework/OpenAL" \ -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ @@ -204,5 +242,5 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v7 with: - name: butterscotch-sdl-macos-${{ matrix.arch }} + name: butterscotch-sdl-macos-powerpc path: build/butterscotch \ No newline at end of file From da11153d6314f5a16e1a247a945fc094af60e746 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:33:46 +0100 Subject: [PATCH 36/48] -mcpu=G3 --- .github/workflows/build-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index a455f19c9..40237a96c 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -199,7 +199,7 @@ jobs: if: steps.cache-ppc.outputs.cache-hit != 'true' env: CC: powerpc-apple-darwin8-gcc - CFLAGS: "-march=G3" + CFLAGS: "-mcpu=G3" run: | export PATH="/usr/local/bin:$PATH" cd vendor/SDL @@ -228,7 +228,7 @@ jobs: -DCMAKE_C_COMPILER="powerpc-apple-darwin8-gcc" \ -DCMAKE_AR="powerpc-apple-darwin8-ar" \ -DCMAKE_RANLIB="powerpc-apple-darwin8-ranlib" \ - -DCMAKE_C_FLAGS="-march=G3 -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/sdl_ppc/include" \ + -DCMAKE_C_FLAGS="-mcpu=G3 -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/sdl_ppc/include" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/sdl_ppc;/usr/local" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/sdl_ppc;/usr/local" \ From 5946a8fafee3f27ed49413552a76e982f9f44031 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:38:15 +0100 Subject: [PATCH 37/48] *gulp* --- .github/workflows/build-macos.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 40237a96c..eb2e38aad 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -200,9 +200,12 @@ jobs: env: CC: powerpc-apple-darwin8-gcc CFLAGS: "-mcpu=G3" + EXTRA_CFLAGS: "-fno-altivec" run: | export PATH="/usr/local/bin:$PATH" cd vendor/SDL + sed -i 's/-fpascal-strings//g' configure + sed -i 's/-faltivec//g' configure ./configure \ --host=powerpc-apple-darwin8 \ --prefix=${{ github.workspace }}/vendor/sdl_ppc \ From 9ab030a2da67f6e901973cad8bca24925436fedf Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:42:43 +0100 Subject: [PATCH 38/48] can we get much higher? --- .github/workflows/build-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index eb2e38aad..b93167861 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -227,6 +227,7 @@ jobs: -DBACKEND=sdl1 \ -DAUDIO_BACKEND=openal \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_C_COMPILER="powerpc-apple-darwin8-gcc" \ -DCMAKE_AR="powerpc-apple-darwin8-ar" \ From 8cc298aa06c1c302296bbac913e4e76196ba6943 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:48:33 +0100 Subject: [PATCH 39/48] mamma mia --- .github/workflows/build-macos.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index b93167861..1692dae98 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -178,6 +178,14 @@ jobs: run: | apt-get update && apt-get install -y cmake ninja-build ccache || true + - name: Relocate Cached SDL Configuration + if: steps.cache-ppc.outputs.cache-hit == 'true' + run: | + SDL_CONFIG_PATH="${{ github.workspace }}/vendor/sdl_ppc/bin/sdl-config" + if [ -f "$SDL_CONFIG_PATH" ]; then + sed -i "s|prefix=.*|prefix=${{ github.workspace }}/vendor/sdl_ppc|g" "$SDL_CONFIG_PATH" + fi + - name: Cache PowerPC SDL and ccache id: cache-ppc uses: actions/cache@v6 From 4e67e9f56f480354e2dfd3c4bffca5b894f9a1aa Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:52:04 +0100 Subject: [PATCH 40/48] screw --- .github/workflows/build-macos.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 1692dae98..937dea41d 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -178,14 +178,6 @@ jobs: run: | apt-get update && apt-get install -y cmake ninja-build ccache || true - - name: Relocate Cached SDL Configuration - if: steps.cache-ppc.outputs.cache-hit == 'true' - run: | - SDL_CONFIG_PATH="${{ github.workspace }}/vendor/sdl_ppc/bin/sdl-config" - if [ -f "$SDL_CONFIG_PATH" ]; then - sed -i "s|prefix=.*|prefix=${{ github.workspace }}/vendor/sdl_ppc|g" "$SDL_CONFIG_PATH" - fi - - name: Cache PowerPC SDL and ccache id: cache-ppc uses: actions/cache@v6 @@ -229,6 +221,7 @@ jobs: SDK_FRAMEWORKS="/usr/local/MacOSX10.4u.sdk/System/Library/Frameworks" SDK_USR_LIB="/usr/local/MacOSX10.4u.sdk/usr/lib" ACC_REMAP="/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate:${SDK_FRAMEWORKS}/vecLib.framework/Versions/A/vecLib" + PPC_SDL_DIR="${{ github.workspace }}/vendor/sdl_ppc" cmake -B build -G Ninja \ -DWERROR=ON \ @@ -240,11 +233,13 @@ jobs: -DCMAKE_C_COMPILER="powerpc-apple-darwin8-gcc" \ -DCMAKE_AR="powerpc-apple-darwin8-ar" \ -DCMAKE_RANLIB="powerpc-apple-darwin8-ranlib" \ - -DCMAKE_C_FLAGS="-mcpu=G3 -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/sdl_ppc/include" \ + -DCMAKE_C_FLAGS="-mcpu=G3 -Wno-deprecated-declarations -I${PPC_SDL_DIR}/include/SDL" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ - -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/sdl_ppc;/usr/local" \ - -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/sdl_ppc;/usr/local" \ - -DCMAKE_INCLUDE_PATH="${{ github.workspace }}/vendor/sdl_ppc/include" \ + -DCMAKE_PREFIX_PATH="${PPC_SDL_DIR};/usr/local" \ + -DCMAKE_FIND_ROOT_PATH="${PPC_SDL_DIR};/usr/local" \ + -DCMAKE_INCLUDE_PATH="${PPC_SDL_DIR}/include/SDL" \ + -DSDL_INCLUDE_DIR="${PPC_SDL_DIR}/include/SDL" \ + -DSDL_LIBRARY="${PPC_SDL_DIR}/lib/libSDL.a" \ -DOPENAL_LIBRARY="${SDK_FRAMEWORKS}/OpenAL.framework/OpenAL" \ -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ From 8b6ccb61bdf9212b3db4043fb66cb066d25eabe5 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:56:03 +0100 Subject: [PATCH 41/48] bugh --- .github/workflows/build-macos.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 937dea41d..d3b1e2d49 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -183,9 +183,9 @@ jobs: uses: actions/cache@v6 with: path: | - ${{ github.workspace }}/vendor/sdl_ppc + /usr/local/powerpc-apple-darwin8 ~/.cache/ccache - key: sdl-ppc-powerpc-v1 + key: sdl-ppc-sysroot-v2 - name: Checkout SDL 1.2 if: steps.cache-ppc.outputs.cache-hit != 'true' @@ -208,7 +208,7 @@ jobs: sed -i 's/-faltivec//g' configure ./configure \ --host=powerpc-apple-darwin8 \ - --prefix=${{ github.workspace }}/vendor/sdl_ppc \ + --prefix=/usr/local/powerpc-apple-darwin8 \ --disable-shared || cat config.log make -j$(nproc) make install @@ -221,7 +221,6 @@ jobs: SDK_FRAMEWORKS="/usr/local/MacOSX10.4u.sdk/System/Library/Frameworks" SDK_USR_LIB="/usr/local/MacOSX10.4u.sdk/usr/lib" ACC_REMAP="/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate:${SDK_FRAMEWORKS}/vecLib.framework/Versions/A/vecLib" - PPC_SDL_DIR="${{ github.workspace }}/vendor/sdl_ppc" cmake -B build -G Ninja \ -DWERROR=ON \ @@ -233,13 +232,10 @@ jobs: -DCMAKE_C_COMPILER="powerpc-apple-darwin8-gcc" \ -DCMAKE_AR="powerpc-apple-darwin8-ar" \ -DCMAKE_RANLIB="powerpc-apple-darwin8-ranlib" \ - -DCMAKE_C_FLAGS="-mcpu=G3 -Wno-deprecated-declarations -I${PPC_SDL_DIR}/include/SDL" \ + -DCMAKE_C_FLAGS="-mcpu=G3 -Wno-deprecated-declarations" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ - -DCMAKE_PREFIX_PATH="${PPC_SDL_DIR};/usr/local" \ - -DCMAKE_FIND_ROOT_PATH="${PPC_SDL_DIR};/usr/local" \ - -DCMAKE_INCLUDE_PATH="${PPC_SDL_DIR}/include/SDL" \ - -DSDL_INCLUDE_DIR="${PPC_SDL_DIR}/include/SDL" \ - -DSDL_LIBRARY="${PPC_SDL_DIR}/lib/libSDL.a" \ + -DCMAKE_PREFIX_PATH="/usr/local/powerpc-apple-darwin8;/usr/local" \ + -DCMAKE_FIND_ROOT_PATH="/usr/local/powerpc-apple-darwin8;/usr/local" \ -DOPENAL_LIBRARY="${SDK_FRAMEWORKS}/OpenAL.framework/OpenAL" \ -DOPENAL_INCLUDE_DIR="${SDK_FRAMEWORKS}/OpenAL.framework/Headers" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ From f96cb0f473aa49f14846c233d251a0bba7c486dd Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 19:59:15 +0100 Subject: [PATCH 42/48] gcc-ar --- .github/workflows/build-macos.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index d3b1e2d49..914172f73 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -230,8 +230,10 @@ jobs: -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_C_COMPILER="powerpc-apple-darwin8-gcc" \ - -DCMAKE_AR="powerpc-apple-darwin8-ar" \ - -DCMAKE_RANLIB="powerpc-apple-darwin8-ranlib" \ + -DCMAKE_AR="powerpc-apple-darwin8-gcc-ar" \ + -DCMAKE_RANLIB="powerpc-apple-darwin8-gcc-ranlib" \ + -DCMAKE_C_COMPILER_AR="powerpc-apple-darwin8-gcc-ar" \ + -DCMAKE_C_COMPILER_RANLIB="powerpc-apple-darwin8-gcc-ranlib" \ -DCMAKE_C_FLAGS="-mcpu=G3 -Wno-deprecated-declarations" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ -DCMAKE_PREFIX_PATH="/usr/local/powerpc-apple-darwin8;/usr/local" \ From 6601e31f81d6c9c55e86cd6551fc2324f2192c67 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 20:03:23 +0100 Subject: [PATCH 43/48] skip out on lto for now --- .github/workflows/build-macos.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 914172f73..d76e30d71 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -227,13 +227,10 @@ jobs: -DBACKEND=sdl1 \ -DAUDIO_BACKEND=openal \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_C_COMPILER="powerpc-apple-darwin8-gcc" \ - -DCMAKE_AR="powerpc-apple-darwin8-gcc-ar" \ - -DCMAKE_RANLIB="powerpc-apple-darwin8-gcc-ranlib" \ - -DCMAKE_C_COMPILER_AR="powerpc-apple-darwin8-gcc-ar" \ - -DCMAKE_C_COMPILER_RANLIB="powerpc-apple-darwin8-gcc-ranlib" \ + -DCMAKE_AR="powerpc-apple-darwin8-ar" \ + -DCMAKE_RANLIB="powerpc-apple-darwin8-ranlib" \ -DCMAKE_C_FLAGS="-mcpu=G3 -Wno-deprecated-declarations" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ -DCMAKE_PREFIX_PATH="/usr/local/powerpc-apple-darwin8;/usr/local" \ From 1ba22b9d5f8bac859d4272417005dd585bfdcd1a Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 20:04:19 +0100 Subject: [PATCH 44/48] pentium-m for gen 1 apple tv --- .github/workflows/build-macos.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index d76e30d71..e25f689d4 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -80,7 +80,7 @@ jobs: path: | vendor/osxcross ~/.cache/ccache - key: osxcross-i386-v1 + key: osxcross-i386-v2 - name: Checkout OSXCross if: steps.cache-intel.outputs.cache-hit != 'true' @@ -115,7 +115,7 @@ jobs: if: steps.cache-intel.outputs.cache-hit != 'true' env: CC: o32-clang - CFLAGS: "-march=yonah" + CFLAGS: "-march=pentium-m" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cd vendor/SDL @@ -144,7 +144,7 @@ jobs: -DCMAKE_C_COMPILER="o32-clang" \ -DCMAKE_AR="i386-apple-darwin8-ar" \ -DCMAKE_RANLIB="i386-apple-darwin8-ranlib" \ - -DCMAKE_C_FLAGS="-march=yonah -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ + -DCMAKE_C_FLAGS="-march=pentium-m -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \ From 4655afbb63b05c91f8e373427edf2a41529cacd1 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 20:05:01 +0100 Subject: [PATCH 45/48] disable altivec --- .github/workflows/build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index e25f689d4..dde5234e8 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -205,10 +205,10 @@ jobs: export PATH="/usr/local/bin:$PATH" cd vendor/SDL sed -i 's/-fpascal-strings//g' configure - sed -i 's/-faltivec//g' configure ./configure \ --host=powerpc-apple-darwin8 \ --prefix=/usr/local/powerpc-apple-darwin8 \ + --disable-altivec \ --disable-shared || cat config.log make -j$(nproc) make install From 8ea982c3a240c4437271c11b46c81f6fdd9db37e Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 20:09:20 +0100 Subject: [PATCH 46/48] pesky --- .github/workflows/build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index dde5234e8..e0b74394b 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -93,7 +93,7 @@ jobs: - name: Download Mac OS X SDK if: steps.cache-intel.outputs.cache-hit != 'true' run: | - curl -L -o vendor/osxcross/tarballs/MacOSX10.4u.sdk.tar.xz https://github.com + curl -L -o vendor/osxcross/tarballs/MacOSX10.4u.sdk.tar.xz https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.4u.sdk.tar.xz - name: Build OSXCross toolchain if: steps.cache-intel.outputs.cache-hit != 'true' From 8bc36a1c6db15ef52968d32dda21c019b8e3957a Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 20:14:41 +0100 Subject: [PATCH 47/48] sse2 shit --- .github/workflows/build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index e0b74394b..e82638218 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -115,7 +115,7 @@ jobs: if: steps.cache-intel.outputs.cache-hit != 'true' env: CC: o32-clang - CFLAGS: "-march=pentium-m" + CFLAGS: "-march=pentium-m -msse -D__m128i=__m128 -D__m128d=__m128" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cd vendor/SDL From 0f2da596c64287cae1cc5e0d8d802aee2cec8b27 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Sun, 23 Aug 2026 20:15:22 +0100 Subject: [PATCH 48/48] msse2 --- .github/workflows/build-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index e82638218..a6c0a0581 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -115,7 +115,7 @@ jobs: if: steps.cache-intel.outputs.cache-hit != 'true' env: CC: o32-clang - CFLAGS: "-march=pentium-m -msse -D__m128i=__m128 -D__m128d=__m128" + CFLAGS: "-march=pentium-m -msse2" run: | export PATH="${{ github.workspace }}/vendor/osxcross/target/bin:$PATH" cd vendor/SDL @@ -144,7 +144,7 @@ jobs: -DCMAKE_C_COMPILER="o32-clang" \ -DCMAKE_AR="i386-apple-darwin8-ar" \ -DCMAKE_RANLIB="i386-apple-darwin8-ranlib" \ - -DCMAKE_C_FLAGS="-march=pentium-m -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ + -DCMAKE_C_FLAGS="-march=pentium-m -msse2 -Wno-deprecated-declarations -I${{ github.workspace }}/vendor/osxcross/target/include" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,AudioToolbox -Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,OpenGL -Xlinker -dylib_file -Xlinker ${ACC_REMAP} ${SDK_USR_LIB}/libobjc.A.dylib ${SDK_USR_LIB}/libgcc_s.1.dylib -Wl,-undefined,dynamic_lookup" \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/vendor/osxcross/target" \ -DCMAKE_FIND_ROOT_PATH="${{ github.workspace }}/vendor/osxcross/target" \