Skip to content

Conversation

saghul
Copy link

@saghul saghul commented Jan 23, 2025

This is basically #128 (thanks @FtZPetruska !) with a couple of extra commits to make it work with Xcode 16 and Python 3.13, as I mentioned here.

newlib master has been fixed too so it builds correctly now.

A simple hello world app works, but I'm just getting my feet wet with Vita development, so some extra eyes would be appreciated.

Based on the master commit history... @Princess-of-Sleeping any chance of seeing this landed?

PS: If you'd like to trust some random person's toolchain build, here is mine: https://cloud.saghul.net/s/jFbqQqoKqECHBm9

PPS: Alternatively you can download the toolchain built by the CI: https://github.com/saghul/vita-buildscripts/actions/runs/12926107705

Cheers!

FtZPetruska and others added 17 commits September 17, 2023 14:47
This allows detecting newer platforms like Apple Silicon.

Also update the commands to use `cmake -E env`.
- Download from github rather than pyyaml.
- Update to the latest version (0.2.5).
- Use `cmake -E env` to invoke the wrapper command.
- Run autoreconf to fix flat namespace issues on macOS 11+.
- Don't use the command wrapper to build, this breaks on arm64 linux.
This adds support for Apple Silicon.
This adds Apple Silicon support.
This is needed by the latest gcc, binutils, and gdb, and will avoid
using the host's version.
- The version update provides support for Apple Silicon.
- The patch offsets were also updated.
- The configure command had to be updated to find GMP/MPFR/MPC. The GDB
configure script called during build uses different flags to set lib
paths.
This adds support for Apple Silicon and zstd.
- This adds support for Apple Silicon hosts.
- The patch was renamed (and updated) to reflect the change.
- Add zstd support.
- zstd external project requires CMake 3.7, so GIT_SHALLOW can be used
unconditionally.
- Use `option` to declare OFFLINE.
- Expand `OFFLINE` in the ExternalProject calls instead of using an
intermediate variable.
- Set CMP0135 to NEW.
Binutils 2.41 requires a version newer than what is provided by macOS.
Also run autoreconf to fix a sporadic issue with automake.
Use the github URL as it will not change when the next version releases.
Fixes building with Xcode 16.
@saghul saghul force-pushed the macos-aarch64-toolchain branch from b383500 to 3de3ffb Compare January 23, 2025 09:25
@saghul
Copy link
Author

saghul commented Jan 23, 2025

@Princess-of-Sleeping
Copy link
Contributor

First, this PR has a change in CMakeLists.txt that updates the gcc version to 13, but the current buildscript kept gcc 10 for some reason.

Right @d3m3vilurr?

@saghul
Copy link
Author

saghul commented Jan 23, 2025

Thanks for the reply!

The main reason to update to 13 is that no prior versions supported Apple Silicon AFAIK.

@d3m3vilurr
Copy link
Contributor

First, this PR has a change in CMakeLists.txt that updates the gcc version to 13, but the current buildscript kept gcc 10 for some reason.

Right @d3m3vilurr?

couple years ago, we received reports that some built results with newer gcc were broken.
(might be, module case; @Princess-of-Sleeping do you remember testcase for this issue??).
that this reason, @frangarcj was reverted gcc version up patch; dfecda4)

after that, we didn't check it yet :'(

PS. in my memory(not clear), current gcc version(>=14) has backward compatibility problem between old versions (<14)
but, it's not a bug & current issue. it's just gcc behavior.

@devnoname120
Copy link
Member

Looks cool, I hope it can be merged one day.

@devnoname120
Copy link
Member

@saghul Could you scope the gcc 13 upgrade to macOS Silicon only? And keep gcc 10 for the rest. This should allow to merge it as currently macOS Silicon is not even supported, so worse case it's still not supported. Just want to make sure we don't break the rest for now.

@saghul
Copy link
Author

saghul commented Jun 9, 2025

You mean to only bump gcc for macOS but keep the current version for other platforms? I could try that.

@devnoname120
Copy link
Member

@saghul For macOS Silicon (not Intel) 👍

@saghul
Copy link
Author

saghul commented Jun 9, 2025

Ok I'll give that a try.

@FtZPetruska
Copy link

The main reason to update to 13 is that no prior versions supported Apple Silicon AFAIK.

Well, back when I opened my PR, I'm pretty sure I went with GCC 13 because it was the latest and newer == better. GCC 11 is actually the first release to support Apple Silicon as a target (GCC>=13 is necessary to target macOS 14+).

With some tinkering, I got GCC 10.5.0 to build on my M1 mac targeting arm-none-eabi and at first glance it's able to compile some code. Although I feel like GCC 13.3.0 may be a better upgrade path for this platform since it's "more supported" than me backporting some random commits.

@scribam
Copy link
Contributor

scribam commented Aug 10, 2025

@saghul Any updates?

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.

6 participants