The upstream issue was fixed, the branch has changes relevant to
`x86_64-darwin` too, and you don’t really want to target Darwin
without these patches.
We reorder the deployment target patch after the patches, as they touch
the same file, and apply it on AArch64 for all versions (but for Darwin
targets rather than hosts, which should be the relevant case anyway).
Co-Authored-By: sempiternal-aurora <78790545+sempiternal-aurora@users.noreply.github.com>
This fixes the GCC 15.2.0 build on aarch64-darwin by addressing two issues
in the libgcc build process:
1. Update libgcc-darwin-detection.patch:
- Catch arm64-apple-darwin (which lacks a version number)
- Add t-darwin-libgccs1 to enable libgcc_s.1.dylib compatibility build
2. Added libgcc-darwin-fix-reexport.patch:
- Remove reexport of darwin-unwind.ver symbols in libgcc_s.1.dylib
- These symbols (___register_frame_info, etc.) don't exist in libgcc
on modern macOS as they come from libSystem
The original build failed with:
Undefined symbols for architecture arm64:
"___deregister_frame_info", referenced from:
-reexported_symbols_list command line option
...
This occurred because darwin-unwind.ver lists unwinder symbols that are
excluded from libgcc (via libgcc-libsystem.ver) on macOS 11+ where they
are provided by the system's libSystem.