Skip to content

Upgrade GCC 13.2.0 version (PPU-SPU) - #121

Open
humbertodias wants to merge 160 commits into
ps3dev:masterfrom
humbertodias:gcc-ppu-spu-13.2.0
Open

humbertodias wants to merge 160 commits into
ps3dev:masterfrom
humbertodias:gcc-ppu-spu-13.2.0

Conversation

@humbertodias

@humbertodias humbertodias commented Mar 5, 2024 •

Copy link
Copy Markdown

Features

  • binutils-ppu bumped from 2.22 to 2.42
  • ppu-gcc bumped from 7.20 to 13.2.0
  • spu-gcc bumped from 7.20 to 9.5.0
  • docker bumped from 16.04 to 24.04 - LTS
  • ci/cd working again and building releases
  • ci/cd to docker hub
  • ci/cd badges
  • build on ubuntu/macOS for arm64 enabled
  • test PSL1GHT hello game

Note

We've selected the version 9.5.0 because it's the last GCC release to include support for SPU.
https://www.phoronix.com/news/GCC-10-Drops-Cell-BE-SPU

Result

  1. ar --version
GNU ar (GNU Binutils) 2.42
Copyright (C) 2024 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
  1. ppu-gcc --version
ppu-gcc (GCC) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1. spu-gcc --version
spu-gcc (GCC) 9.5.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1. Docker
FROM ubuntu:24.04
  1. ci/cd success

image

https://github.com/humbertodias/ps3toolchain/actions/runs/8166663270

  1. ci/cd docker
    image

Note

Don't forget to create a named DockerHub environment on your repository with two secret variables: DOCKERHUB_USERNAME and DOCKERHUB_TOKEN

  1. badges
    image

  2. PSL1GHT hello game

image

@humbertodias humbertodias changed the title add gcc-ppu-spu v13.2.0 Update GCC to 13.2.0 (PUU-SPU) Mar 5, 2024
@humbertodias humbertodias changed the title Update GCC to 13.2.0 (PUU-SPU) Update GCC version (PUU-SPU) Mar 5, 2024
@humbertodias humbertodias changed the title Update GCC version (PUU-SPU) Update GCC version (PPU-SPU) Mar 5, 2024
@Fewnity

Fewnity commented Mar 5, 2024

Copy link
Copy Markdown

Hey cool work, I really want gcc 13 on ps3. But you just forgot to credit Darjan Krijanand and luizfernandonb :/

@humbertodias

Copy link
Copy Markdown
Author

Hey cool work, I really want gcc 13 on ps3. But you just forgot to credit Darjan Krijanand and luizfernandonb :/

Yeah.. I left his name on patch's file given him the credit

@zeldin

zeldin commented Sep 2, 2026

Copy link
Copy Markdown
Member

Got it. Here ps3dev/gcc-PS3#1

Thanks. However, please don't slap a new upstreams version on the master branch; we have an upstream branch where the gcc sources are imported without any PS3 modifications (so exactly what comes in the upstream tarball), and then we merge that into master to keep changes with traceability. The patch for ps3toolchain is then simply generated by git diff upstream master.

You don't need to make a separate pull request for the upstream branch; just keep the same structure in your own repo and submit the master branch commit with the merge intact and we can work with that.

If the new gcc version has diverged too much for a merge to be practical, it's better to create a new repo (still with an upstream branch in the same way) and cherry-pick the commits from the old repo that are still relevant.

This may all seem like extra work, but it does ensure maintainability going forward.

@humbertodias

humbertodias commented Sep 3, 2026 •

Copy link
Copy Markdown
Author

Got it. Here ps3dev/gcc-PS3#1

Thanks. However, please don't slap a new upstreams version on the master branch; we have an upstream branch where the gcc sources are imported without any PS3 modifications (so exactly what comes in the upstream tarball), and then we merge that into master to keep changes with traceability. The patch for ps3toolchain is then simply generated by git diff upstream master.

You don't need to make a separate pull request for the upstream branch; just keep the same structure in your own repo and submit the master branch commit with the merge intact and we can work with that.

If the new gcc version has diverged too much for a merge to be practical, it's better to create a new repo (still with an upstream branch in the same way) and cherry-pick the commits from the old repo that are still relevant.

This may all seem like extra work, but it does ensure maintainability going forward.

Thanks for the guidance - I've restructured this PR to match that workflow.

upstream on my fork is a clean import of gcc-13.2.0.tar.xz (tag gcc-13.2.0-upstream), with no PS3 changes.
This branch merges that tag into master (Merge tag 'gcc-13.2.0-upstream') and keeps the PS3-only commits on top. There is no separate PR for upstream.

The ps3toolchain patch can be generated with:

git diff upstream gcc-ppu-spu-13.2.0

Please, let me know if i missed anything.

@zeldin

zeldin commented Sep 4, 2026

Copy link
Copy Markdown
Member

Perfect! Thank you. Now it's also easier to review.

@Cruslan

Cruslan commented Sep 6, 2026

Copy link
Copy Markdown

I wanna see this update, GCC's improved auto-vectorizer and SNS modules significantly improves performance.

@Fewnity

Fewnity commented Sep 6, 2026

Copy link
Copy Markdown

GCM samples from PSL1GHT should be compiled with the update because if I remember correctly, GCM stuff wasn't working well when I tested when the PR was created.

@Cruslan

Cruslan commented Sep 6, 2026

Copy link
Copy Markdown

On my PS3 Moonlight project i compiled pr for myself. I didn't see any problems with that, my project utilized Tiny3D for display.

@humbertodias

Copy link
Copy Markdown
Author

Tested with SoRR

bennug64-port-ps3.mp4

@zeldin

zeldin commented Sep 13, 2026

Copy link
Copy Markdown
Member

@humbertodias Your gcc updates have been merged through the gcc-PS3 repository.
Please rebase your remaining changes on current master and open smaller pull requests for anything which is still relevant. Thanks!

Keep split PPU/SPU/host patches and gcc-PS3 PPU delta (no TARGET_USES_LINUX64_OPT).
Take master's newlib dirent sentinels and SPU --with-newlib/--with-pic.
The upstream merge left a cat of gcc-9.5.0-PS3.patch; SPU already uses the -SPU/-host/-macos-arm64 patches.
@humbertodias

humbertodias commented Sep 13, 2026 •

Copy link
Copy Markdown
Author

@humbertodias Your gcc updates have been merged through the gcc-PS3 repository. Please rebase your remaining changes on current master and open smaller pull requests for anything which is still relevant. Thanks!

Sure! master branch merged into this PR

Keep split GCC patches; also refresh newlib config.guess/config.sub and keep SPU --with-system-zlib.
The last master merge applied those hunks to gcc-13.2.0-PS3-PPU.patch; they already exist in GCC 13 and make GNU patch fail on Linux after zlib.
Comment thread .github/workflows/build.yml
@bucanero

Copy link
Copy Markdown
Contributor

Sure! master branch merged into this PR

thanks for all your efforts here @humbertodias 👍 I've triggered the CI checks to confirm everything builds ok.

Please follow up with zeldin if you have questions or need another review. 🙏

@Fancy2209

Copy link
Copy Markdown
Member

Could the docker ci be skipped for pull requests?

…h # fails closed in a few seconds when those secrets are unavailable
@humbertodias

Copy link
Copy Markdown
Author

Could the docker ci be skipped for pull requests?

Sure! Skipped 6f580ea

@bucanero bucanero linked an issue Sep 23, 2026 that may be closed by this pull request
@zeldin

zeldin commented Sep 23, 2026

Copy link
Copy Markdown
Member

So, looking at the current "Files changed" for this PR, there are a few unrelated changes here:

  • Changes to the CI workflow / Docker image
  • Version bump of binutils
  • Restoring the gdb builds (@Fancy2209 why were these removed in the first place? The commit message explains nothing.)

These should be made into separate PRs so that they can be reviewed and merged (if appropriate).

In addition there's a bunch of other stuff which I don't think is relevant, like the utils functions to handle config.guess/config.sub replacement (already handled elsewhere). If there are additional things which are still relevant, they should also go into separate pull requests.

Kitchen sink PRs like this one can be useful to try get some testing of a complete set of changes, but they are not conductive to actual merging. 😸

@Fancy2209

Copy link
Copy Markdown
Member

So, looking at the current "Files changed" for this PR, there are a few unrelated changes here:

  • Changes to the CI workflow / Docker image
  • Version bump of binutils
  • Restoring the gdb builds (@Fancy2209 why were these removed in the first place? The commit message explains nothing.)

These should be made into separate PRs so that they can be reviewed and merged (if appropriate).

In addition there's a bunch of other stuff which I don't think is relevant, like the utils functions to handle config.guess/config.sub replacement (already handled elsewhere). If there are additional things which are still relevant, they should also go into separate pull requests.

Kitchen sink PRs like this one can be useful to try get some testing of a complete set of changes, but they are not conductive to actual merging. 😸

GDB was causing issues building on macOS from what I remember and users can install GDB-Multiarch to get the same result, we also have no way to actually use GDB outside RPCS3 from what I know. I can look into restoring it.

@zeldin

zeldin commented Sep 23, 2026

Copy link
Copy Markdown
Member

GDB was causing issues building on macOS from what I remember and users can install GDB-Multiarch to get the same result, we also have no way to actually use GDB outside RPCS3 from what I know. I can look into restoring it.

Sounds like a better solution would be to fix the build issues then. Probably there is some upstreams commit that can be backported.

GDB should be able to interact with gdbserver running on hardware I think.

This branch had an error being deployed

1 failed (outdated) deployment
DockerHub — fce08b7b Deployed Sep 22, 2026 by humbertodias via dockerhub-push (linux/amd64) #114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question] Would it be possible to update gcc?

10 participants