diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2022-12-22 17:32:59 +0000 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2023-01-02 10:52:59 +0000 |
commit | 8385088039f58a1d403cbb0792105236d240de85 (patch) | |
tree | eddd500ce05ab6f8776f933640a07946f9bb4c91 /gcc/config | |
parent | 46c0ea7704e9da9e6d574afc7ca1d218f49d237a (diff) | |
download | gcc-8385088039f58a1d403cbb0792105236d240de85.zip gcc-8385088039f58a1d403cbb0792105236d240de85.tar.gz gcc-8385088039f58a1d403cbb0792105236d240de85.tar.bz2 |
Ada,Darwin: Do not link libgcc statically on Darwin 8 and 9 [PR108202].
Normally, GCC executables are built with -static-libstdc++ -static-libgcc
on Darwin. This is fine in most cases, because GCC executables typically
do no use exceptions. However gnat1 does use exceptions and also pulls
in system libraries that are linked against the installed shared libgcc
which contains the system unwinder. This means that gnat1 effectively has
two unwinder instances (which does not work reliably since the unwinders
have global state).
A recent change in the initialization of FDEs has made this a hard error
now on Darwin versions (8 and 9) with libgcc installed in /usr/lib (gnat1
now hangs when an exception is thrown).
The solution is to link libgcc dynamically, picking up the installed
system version. To do this we strip -static-libgcc from the link flags.
PR ada/108202
gcc/ada/ChangeLog:
* gcc-interface/Make-lang.in (GCC_LINKERFLAGS, GCC_LDFLAGS):
Versions of ALL_LINKERFLAGS, LDFLAGS with -Werror and
-static-libgcc filtered out for Darwin8 and 9 (-Werror is filtered
out for other hosts).
Diffstat (limited to 'gcc/config')
0 files changed, 0 insertions, 0 deletions