Skip to content

Add Apple Silicon support and optional local toolchain sources - #32

Open
JackTriton wants to merge 3 commits into
glankk:masterfrom
JackTriton:arm64-redone
Open

Add Apple Silicon support and optional local toolchain sources#32
JackTriton wants to merge 3 commits into
glankk:masterfrom
JackTriton:arm64-redone

Conversation

@JackTriton

Copy link
Copy Markdown

Add Apple Silicon support and optional local toolchain sources

This PR improves macOS Apple Silicon compatibility while keeping the existing Linux, BSD, Intel macOS, and MSYS2 build paths unchanged.

Changes

  • Detect Homebrew dependencies on Apple Silicon.

  • Use GNU sed where required by GCC and binutils build scripts.

  • Propagate GMP, MPFR, and MPC include/library paths into recursive configure steps.

  • Add optional local archives through:

    • N64_TOOLCHAIN_ARCHIVE_DIR
    • BINUTILS_ARCHIVE
    • GCC_ARCHIVE
    • NEWLIB_ARCHIVE
    • GDB_ARCHIVE
  • Add --disable-toolchain-gdb for builds that do not require GDB. GDB remains enabled by default, preserving the existing source-build behavior.

  • Apply the Apple Silicon-specific --disable-werror workaround only on Darwin arm64.

  • Preserve GDB as the default for normal source builds.

  • Replace GNU/Linux-specific file-editing assumptions with portable implementations.

  • Keep the project generic for N64 development without application-specific behavior.

Compatibility

Existing behavior is preserved on non-Apple-Silicon platforms. Local archives and GDB overrides are optional and do not affect the default online build.

@flagrama

Copy link
Copy Markdown

I'm not sure about this, it looks like way too much slop again. Really all that needs to be done AFAIK is what shirosoluna says here: OoTRandomizer/homebrew-tap#4 (comment) which is using the system zlib when on macOS.

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