libgcc, Darwin: Build a libgcc_s.1 for backwards compatibility.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 21 Nov 2021 17:19:24 +0000 (17:19 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Wed, 8 Dec 2021 19:53:28 +0000 (19:53 +0000)
commit7add7f7bb3d35726a0c45322ffdbbab2bbf6a348
tree2e2229281da0d7c80fcf9b5ee5ef3ddd88f9550c
parent1c1563fb8ff227590eb5ab0fc3d22f3b0a57c241
libgcc, Darwin: Build a libgcc_s.1 for backwards compatibility.

In order to reslve a long-standing issue with inter-operation
with libSystem, we have bumped the SO name for libgcc_s.

Distributions might wish to install this new version into a
structure where exisiting code is already linked with the
compiler-local libgcc_s.1 (providing symbols exported by the
now-retired libgcc_ext.10.x shims).

The replacement libgcc_s.1 forwards the symbols from the new SO.
In order to support DYLD_LIBRARY_PATH on systems (where it works)
we forward the libSystem unwinder symbols from 10.7+ and a
compiler-local version of the libgcc unwinder on earlier.

For macOS 10.4 to 10.6 this is 'bug-compatible' with existing uses.
For 10.7+ the behaviour will now actually be correct.

This should be squashed with the initial libgcc changes for PR80556
in any backport (r12-5418-gd4943ce939d)

libgcc/ChangeLog:

* config.host (*-*-darwin*): Add logic to build a shared
unwinder library for Darwin8-10.
* config/i386/t-darwin: Build legacy libgcc_s.1.
* config/rs6000/t-darwin: Likewise.
* config/t-darwin: Reorganise the EH fragments to place
them for inclusion in a shared EH lib.
* config/t-slibgcc-darwin: Build a legacy libgcc_s.1 and
the supporting pieces (all FAT libs).
* config/t-darwin-noeh: Removed.
* config/darwin-unwind.ver: New file.
* config/rs6000/t-darwin-ehs: New file.
* config/t-darwin-ehs: New file.
libgcc/config.host
libgcc/config/darwin-unwind.ver [new file with mode: 0644]
libgcc/config/i386/t-darwin
libgcc/config/rs6000/t-darwin
libgcc/config/rs6000/t-darwin-ehs [new file with mode: 0644]
libgcc/config/t-darwin
libgcc/config/t-darwin-ehs [new file with mode: 0644]
libgcc/config/t-darwin-noeh [deleted file]
libgcc/config/t-slibgcc-darwin