gcc/libgcc/config
Iain Sandoe d4943ce939 Darwin: Rework handling for unwinder code in libgcc_s and specs [PR80556].
This addresses a long-standing problem where a work-around for an unwinder
issue (also a regression) regresses other functionality.  The patch replaces
several work-arounds with a fix for PR80556 and a work-around for PR88590.

* The fix for PR80556 requires a bump to the SO name for libgcc_s, since we
need to remove the unwinder symbols from it.  This would trigger PR88590
hence the work-around for that.

* We weaken the symbols for emulated TLS support so that it is possible
for a DSO linked with static-libgcc to interoperate with a DSO linked with
libgcc_s.  Likewise main exes.

* We remove all the gcc-4.2.1 era stubs machinery and workarounds.

* libgcc is always now linked ahead of libc, which avoids fails where the
libc (libSystem) builtins implementations are not up to date.

* The unwinder now always comes from the system
 - for Darwin9 from /usr/lib/libgcc_s.1.dylib
 - for Darwin10 from /usr/lib/libSystem.dylib
 - for Darwin11+ from /usr/lib/system/libunwind.dylib.

 We still insert a shim on Darwin10 to fix an omitted unwind function, but
 the underlying unwinder remains the system one.

* The work-around for PR88590 has two parts (1) we always link libgcc from
its convenience lib on affected system versions (avoiding the need to find
the DSO path); (2) we add and export the emutls functions from DSOs - this
makes a relatively small (20k) addition to a DSO.  These can be backed out
when a proper fix for PR88590 is committed.

For distributions that wish to install a libgcc_s.1.dylib to satisfy linkage
from exes that linked against the stubs can use a reexported libgcc_s.1.1
(since that contains all the symbols that were previously exported via the
 stubs).

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

gcc/ChangeLog:

	PR target/80556
	* config/darwin-driver.c (darwin_driver_init): Handle exported
	symbols and symbol lists (suppress automatic export of the TLS
	symbols).
	* config/darwin.c (darwin_rename_builtins): Remove workaround.
	* config/darwin.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
	(REAL_LIBGCC_SPEC): Handle revised library uses.
	* config/darwin.opt (nodefaultexport): New.
	* config/i386/darwin.h (PR80556_WORKAROUND): Remove.
	* config/i386/darwin32-biarch.h (PR80556_WORKAROUND): Likewise.
	* config/i386/darwin64-biarch.h (PR80556_WORKAROUND): Likewise.

libgcc/ChangeLog:

	* config.host: Add weak emutls crt to the extra_parts.
	* config/i386/darwin-lib.h (DECLARE_LIBRARY_RENAMES): Remove
	workaround.
	* config/libgcc-libsystem.ver: Add exclude list for the system-
	provided unwinder.
	* config/t-slibgcc-darwin: Bump SO version, remove stubs code.
	* config/i386/libgcc-darwin.10.4.ver: Removed.
	* config/i386/libgcc-darwin.10.5.ver: Removed.
	* config/rs6000/libgcc-darwin.10.4.ver: Removed.
	* config/rs6000/libgcc-darwin.10.5.ver: Removed.
	* config/t-darwin-noeh: New file.

gcc/testsuite/ChangeLog:

	* gcc.dg/torture/fp-int-convert-timode-3.c: Remove XFAIL.
	* gcc.dg/torture/fp-int-convert-timode-4.c: Likewise.
2021-11-19 19:58:11 +00:00
..
aarch64 libgcc: Add missing runtime exception notices 2021-08-31 10:56:34 +01:00
alpha Update copyright years. 2021-01-04 10:26:59 +01:00
arc Update copyright years. 2021-01-04 10:26:59 +01:00
arm arm: add erratum mitigation to __gnu_cmse_nonsecure_call [PR102035] 2021-08-24 11:45:13 +01:00
avr Update copyright years. 2021-01-04 10:26:59 +01:00
bfin Update copyright years. 2021-01-04 10:26:59 +01:00
bpf GCC port for eBPF 2019-09-09 12:13:23 +02:00
c6x Update copyright years. 2021-01-04 10:26:59 +01:00
cr16 Update copyright years. 2021-01-04 10:26:59 +01:00
cris Update copyright years. 2021-01-04 10:26:59 +01:00
csky Update copyright years. 2021-01-04 10:26:59 +01:00
epiphany Update copyright years. 2021-01-04 10:26:59 +01:00
fr30 Update copyright years. 2021-01-04 10:26:59 +01:00
frv libgcc: Add missing runtime exception notices 2021-08-31 10:56:34 +01:00
ft32 Update copyright years. 2021-01-04 10:26:59 +01:00
gcn amdgcn: Enable support for TImode for AMD GCN 2021-06-29 08:19:56 -07:00
h8300 Update copyright years. 2021-01-04 10:26:59 +01:00
i386 Darwin: Rework handling for unwinder code in libgcc_s and specs [PR80556]. 2021-11-19 19:58:11 +00:00
ia64 Update copyright years. 2021-01-04 10:26:59 +01:00
iq2000 Update copyright years. 2021-01-04 10:26:59 +01:00
libbid Update copyright years. 2021-01-04 10:26:59 +01:00
lm32 Update copyright years. 2021-01-04 10:26:59 +01:00
m32c Update copyright years. 2021-01-04 10:26:59 +01:00
m32r Remove m32r{,le}-*-linux* support from GCC 2021-09-13 15:16:56 +00:00
m68k Update copyright years. 2021-01-04 10:26:59 +01:00
mcore Update copyright years. 2021-01-04 10:26:59 +01:00
microblaze Update copyright years. 2021-01-04 10:26:59 +01:00
mips Update copyright years. 2021-01-04 10:26:59 +01:00
mmix Update copyright years. 2021-01-04 10:26:59 +01:00
moxie Update copyright years. 2021-01-04 10:26:59 +01:00
msp430 Update copyright years. 2021-01-04 10:26:59 +01:00
nds32 Update copyright years. 2021-01-04 10:26:59 +01:00
nios2 Update copyright years. 2021-01-04 10:26:59 +01:00
nvptx Update copyright years. 2021-01-04 10:26:59 +01:00
or1k or1k: Update FPU to specify detect tininess before rounding 2021-10-23 05:57:16 +09:00
pa Support TI mode and soft float on PA64 2021-11-05 16:07:35 +00:00
pdp11 t-pdp11 (LIB2ADD): Add divmod.c. 2018-11-01 14:36:52 -04:00
pru libgcc: pru: Place mpyll into its own section 2021-05-13 23:11:01 +03:00
riscv RISC-V: Update soft-fp config for big-endian 2021-03-23 17:31:13 +08:00
rl78 Update copyright years. 2021-01-04 10:26:59 +01:00
rs6000 Darwin: Rework handling for unwinder code in libgcc_s and specs [PR80556]. 2021-11-19 19:58:11 +00:00
rx Update copyright years. 2021-01-04 10:26:59 +01:00
s390 libgcc: use .init_stack for constructors if available 2021-10-07 20:24:43 -07:00
score Update copyright years. 2021-01-04 10:26:59 +01:00
sh Update copyright years. 2021-01-04 10:26:59 +01:00
sol2 Update copyright years. 2021-01-04 10:26:59 +01:00
sparc Update copyright years. 2021-01-04 10:26:59 +01:00
stormy16 Update copyright years. 2021-01-04 10:26:59 +01:00
tilegx
tilepro Update copyright years. 2021-01-04 10:26:59 +01:00
v850 Update copyright years. 2021-01-04 10:26:59 +01:00
vax Update copyright years. 2021-01-04 10:26:59 +01:00
visium Update copyright years. 2021-01-04 10:26:59 +01:00
vms Update copyright years. 2021-01-04 10:26:59 +01:00
xtensa Update copyright years. 2021-01-04 10:26:59 +01:00
darwin-64.c Update copyright years. 2021-01-04 10:26:59 +01:00
darwin-crt-tm.c Update copyright years. 2021-01-04 10:26:59 +01:00
darwin-crt3.c Update copyright years. 2021-01-04 10:26:59 +01:00
darwin10-unwind-find-enc-func.c Darwin, crts: Fix a build warning. 2021-11-05 20:48:05 +00:00
gthr-lynx.h Update copyright years. 2021-01-04 10:26:59 +01:00
gthr-rtems.h Update copyright years. 2021-01-04 10:26:59 +01:00
gthr-vxworks-cond.c Update copyright years. 2021-01-04 10:26:59 +01:00
gthr-vxworks-thread.c Update copyright years. 2021-01-04 10:26:59 +01:00
gthr-vxworks-tls.c Update copyright years. 2021-01-04 10:26:59 +01:00
gthr-vxworks.c Update copyright years. 2021-01-04 10:26:59 +01:00
gthr-vxworks.h Update copyright years. 2021-01-04 10:26:59 +01:00
hardfp.c Update copyright years. 2021-01-04 10:26:59 +01:00
libgcc-glibc.ver Update copyright years. 2021-01-04 10:26:59 +01:00
libgcc-libsystem.ver Darwin: Rework handling for unwinder code in libgcc_s and specs [PR80556]. 2021-11-19 19:58:11 +00:00
no-sfp-machine.h
no-unwind.h
t-crtfm
t-crtstuff-pic
t-darwin libgcc, emutls: Allow building weak definitions of the emutls functions. 2021-11-19 19:53:39 +00:00
t-darwin-noeh Darwin: Rework handling for unwinder code in libgcc_s and specs [PR80556]. 2021-11-19 19:58:11 +00:00
t-dfprules
t-eh-dw2-dip
t-fdpbit
t-fixedpoint-gnu-prefix
t-fpbit
t-freebsd-thread
t-gnu-prefix
t-gthr-noweak musl: Don't use gthr weak refs in libgcc PR91737 2019-11-18 12:08:18 +00:00
t-gthr-vxworks Improve the thread support for VxWorks 2019-11-14 15:58:31 +00:00
t-gthr-vxworksae Update the libgcc support for VxWorks AE/653 2019-11-14 16:00:55 +00:00
t-hardfp Update copyright years. 2021-01-04 10:26:59 +01:00
t-hardfp-sfdf Update copyright years. 2021-01-04 10:26:59 +01:00
t-libgcc-pic
t-libunwind
t-libunwind-elf Update copyright years. 2021-01-04 10:26:59 +01:00
t-linux
t-openbsd-thread
t-rtems
t-slibgcc libgcc: Honor LDFLAGS_FOR_TARGET when linking libgcc_s 2021-08-05 17:32:06 +02:00
t-slibgcc-darwin Darwin: Rework handling for unwinder code in libgcc_s and specs [PR80556]. 2021-11-19 19:58:11 +00:00
t-slibgcc-elf-ver
t-slibgcc-fuchsia libgcc: Honor LDFLAGS_FOR_TARGET when linking libgcc_s 2021-08-05 17:32:06 +02:00
t-slibgcc-gld
t-slibgcc-gld-nover
t-slibgcc-hpux
t-slibgcc-libgcc Update copyright years. 2021-01-04 10:26:59 +01:00
t-slibgcc-nolc-override
t-slibgcc-sld Use v2 map syntax in libgcc-unwind.map if Solaris ld supports it 2018-09-18 07:04:15 +00:00
t-slibgcc-vms libgcc: Honor LDFLAGS_FOR_TARGET when linking libgcc_s 2021-08-05 17:32:06 +02:00
t-softfp Update copyright years. 2021-01-04 10:26:59 +01:00
t-softfp-compat
t-softfp-excl
t-softfp-sfdf
t-softfp-sfdftf IA MCU psABI support: changes to libraries 2015-06-30 09:42:07 -07:00
t-softfp-tf
t-stack
t-tls
t-vxcrtstuff Fix the vxworks crtstuff handling of kernel/rtp variations 2020-10-16 15:33:35 +00:00
t-vxworks introduce overridable clear_cache emitter 2020-12-02 22:10:32 -03:00
t-vxworks7 introduce overridable clear_cache emitter 2020-12-02 22:10:32 -03:00
t-vxworksae Update the libgcc support for VxWorks AE/653 2019-11-14 16:00:55 +00:00
unwind-dw2-fde-darwin.c Update copyright years. 2021-01-04 10:26:59 +01:00
vxcrtstuff.c Fix typo in macro name guarding conditional in vxcrtstuff.c 2019-12-30 21:11:22 +00:00