iains / gcc-darwin-arm64

GCC master branch for Darwin with experimental support for Arm64. Currently GCC-15.0.0 [September 2024]
GNU General Public License v2.0
268 stars 33 forks source link

CLT 15 betas: some failures with ld, ld-classic is OK #124

Closed simonjwright closed 10 months ago

simonjwright commented 10 months ago

We were all pleased when the link failures with CLT 15.0 (e.g. issue #117), which could be worked round with -Wl,-ld_classic, no longer needed the workround with 15.1beta, and 15.1beta2.

The Ada tool suite contains some sizeable Ada tools. Built on aarch64 with GCC 13.1.0 and CLT 14.2 or 3, it has run for several months.

On rebuilding one of the tools (alr), still with GCC 13.1.0 but with CLT 15.1b2, it failed at runtime (incorrect internal count).

While investigating, I found that another tool (gprconfig) failed to catch an exception which it should have done, and that the executables had changed size.

It took me a lot longer than it should have done to suspect the linker, and it turns out that both errors are fixed by linking using ld-classic.

@fxcoudert are you seeing this anywhere else? (I will not be able to do much for the next week or two because of WG21 commitments, that includes testing any newer XC versions that need access to my CI machines9

iains commented 10 months ago

apologies, I mean to reply to the comment not edit it ... blame jet lag.

fxcoudert commented 10 months ago

@simonjwright do you have a minimal reproducer? For someone who knows nothing about Ada

simonjwright commented 10 months ago

I have no idea how I managed to convince myself that this was ld vs ld-classic. I’ve been unable to reproduce the uncaught exception, and the problem with alr turned out to be an upstream bug (return statement doesn’t return the value updated in the statement). It’ll be a battle to create a reproducer.