Darwin driver updates for macOS 27 numbering scheme
The GCC Darwin driver now recognizes macOS 27, codenamed Golden Gate, by updating its internal version mapping to correspond to `darwin27`.
This commit updates the GCC Darwin driver to align with Apple’s new macOS numbering convention, specifically for macOS 27 (Golden Gate). Previous macOS versions had an inconsistent mapping, where macOS 26 was darwin25. The driver now correctly maps macOS 27 to darwin27, ensuring proper toolchain functionality and compatibility with the latest operating system release.
In Details
The darwin-driver.cc file within GCC handles the mapping between macOS versions and the internal darwin version number used by the compiler and linker. Historically, this mapping has not been strictly sequential (e.g., macOS 26 corresponded to darwin25, with darwin26 being skipped). With the release of macOS 27 (Golden Gate), the mapping is now direct: macOS 27 should resolve to darwin27. This patch updates the driver logic to correctly recognize and utilize this new darwin version number for target identification and feature selection, ensuring the compiler uses appropriate setti…
For Context
Compilers like GCC need to know which version of an operating system they are targeting (like macOS) to generate the correct code. Apple regularly updates macOS, and each version has an internal 'Darwin' version number that the compiler uses. Sometimes, these internal numbers don't perfectly match the macOS marketing name. For example, macOS 26 was internally known as darwin25, skipping darwin26. This update teaches the GCC compiler about the latest macOS version, macOS 27 (also known as Golden Gate), and how it maps directly to darwin27. This ensures that when you compile programs for macOS 27, GCC will use the correct settings and features available on that operating system.