Open simonjwright opened 3 weeks ago
@simonjwright Do we still need libexec/gcc/aarch64-apple-darwin23.5.0/14.1.0/ld
wrapper script, BTW?
Do we still need libexec/gcc/aarch64-apple-darwin23.5.0/14.1.0/ld wrapper script, BTW?
In earlier releases of GCC 14.1, I found an issue if a compiler built against Xcode 15.(n > 0) attempted to compile (some) C against Xcode 14.n, to do with availability headers not being available (!). I believe (and simple tests appear to confirm) that this has been fixed in the gcc-14.1-darwin-r1
tag.
This would only unavoidably affect users with older Macs stuck on macOS Monterey, who can’t use Xcode later than 14.2.
As to the ld fix script -- now that the compiler handles exceptions properly, it’s only required for people still using Xcode (or Command Line Tools) 15.0. They really need to upgrade.
Of course, this could well impact people who download the compiler "just to try it out".
I see that nothing on the https://ada-lang.io/docs/category/getting-started or https://alire.ada.dev/docs/#alr-on-macos mentions that macOS users absolutely require Xcode (or the Command Line Tools). I can update the former and mention this requirement (and that the version installed must be 15.(n>0). I also see that my https://github.com/simonjwright/distributing-gcc/wiki/InstallingThePackage could do with an overhaul.
I see that Xcode 16 is at release candidate stage! exciting times ...
The PR Update for GNAT FSF 14.1 failed to build GCC on Apple silicon (using the Github runner
macos-14
).The problem was an error where an internal tool (
gen_il-main
), built during stage 2, failed to run even though what appeared to be exactly the same tool built in stage 1 had run successfully. In both cases, the tool was built using the base (host) GCC 13.2.0 compiler.The build ran successfully on a local machine. This made diagnosis difficult.
Considerable help was received from one of the GCC maintainers for Apple.
After a lot of failed attempts, we built successfully by
using Xcode 15.3. The default for the
macos-14
runner is Xcode 15.0.1, which has the infamous linking error. The latest Xcode is actually 15.4, but Apple haven't yet updated the Command Line Tools (which most people are likely to be using, because of their smaller size) past 15.3.using GCC 13.3.0 as the base compiler.
removing the GCC configuration switch
--without-build-config
, which was inserted to work round the now-fixed issue in GCC PR 100340. Here, the switch caused a GCC stage 2/3 comparison failure.The changes can be seen in the
macos-arm
branch of this fork, with the successful test run here. Note, I haven't raised a PR because it uses an unofficial GCC 13.3.0 build.