Skip to content

Conversation

@andressbarajas
Copy link
Contributor

@andressbarajas andressbarajas commented Jun 20, 2025

What this does
This patch fixes build issues on newer macOS systems (like Apple Silicon Macs running Clang 17 or higher). It checks the Clang version and adds --with-system-zlib if needed, which avoids problems with fdopen() in zlib.

Why it's needed
Clang 17+ doesn’t play nice with the bundled zlib—it causes build errors because of a missing fdopen() macro. Using the system zlib fixes that.

Also includes
Support for both Homebrew and MacPorts to locate gmp, mpfr, and libmpc

Clean integration with the existing TARG_XTRA_OPTS logic

Tested on
macOS Sonoma (M4 Mac Mini)

Homebrew + Clang 17+

NOTE: Similiar fix is in the pipeline for KOS.

@andressbarajas andressbarajas force-pushed the macos_clang_fix branch 5 times, most recently from cde0979 to 7c64420 Compare June 23, 2025 15:53
@fjtrujy fjtrujy merged commit 3ecd0fb into ps2dev:main Jun 23, 2025
5 checks passed
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.

2 participants