gcc/libgcc
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
..
config Darwin: Rework handling for unwinder code in libgcc_s and specs [PR80556]. 2021-11-19 19:58:11 +00:00
soft-fp Update hf soft-fp from glibc. 2021-09-02 14:11:53 +08:00
ChangeLog Daily bump. 2021-11-12 00:16:32 +00:00
Makefile.in Explicitly add -msse2 to compile HF related libgcc source file. 2021-09-06 15:13:14 +08:00
config.host Darwin: Rework handling for unwinder code in libgcc_s and specs [PR80556]. 2021-11-19 19:58:11 +00:00
config.in gcov: use mmap pools for KVP. 2021-03-03 14:21:45 +01:00
configure rs6000: Fix typos in float128 ISA3.1 support 2021-06-22 23:09:30 -05:00
configure.ac rs6000: Fix typos in float128 ISA3.1 support 2021-06-22 23:09:30 -05:00
crtstuff.c Update copyright years. 2021-01-04 10:26:59 +01:00
dfp-bit.c Fix a comment line that was too long. 2021-02-22 15:54:39 -05:00
dfp-bit.h Require GLIBC 2.32 for Decimal/_Float128 conversions. 2021-03-29 16:43:14 -04:00
divmod.c Update copyright years. 2021-01-04 10:26:59 +01:00
emutls.c libgcc, emutls: Allow building weak definitions of the emutls functions. 2021-11-19 19:53:39 +00:00
enable-execute-stack-empty.c
enable-execute-stack-mprotect.c Update copyright years. 2021-01-04 10:26:59 +01:00
find-symver.awk Update copyright years. 2021-01-04 10:26:59 +01:00
fixed-bit.c Update copyright years. 2021-01-04 10:26:59 +01:00
fixed-bit.h Update copyright years. 2021-01-04 10:26:59 +01:00
fixed-obj.mk Makefile.in (fixed-funcs,fixed-conv-funcs): filter-out LIB2FUNCS_EXCLUDE before adding them to libgcc-objects, libgcc-s-objects. 2012-08-23 15:41:03 +00:00
floatunsidf.c
floatunsisf.c
floatunsitf.c
floatunsixf.c
fp-bit.c Update copyright years. 2021-01-04 10:26:59 +01:00
fp-bit.h Update copyright years. 2021-01-04 10:26:59 +01:00
gbl-ctors.h Update copyright years. 2021-01-04 10:26:59 +01:00
gcov.h gcov: Add __gcov_info_to_gdca() 2021-08-06 07:28:26 +02:00
gen-fixed.sh
generic-morestack-thread.c Update copyright years. 2021-01-04 10:26:59 +01:00
generic-morestack.c Update copyright years. 2021-01-04 10:26:59 +01:00
generic-morestack.h Update copyright years. 2021-01-04 10:26:59 +01:00
gstdint.h
gthr-posix.h Update copyright years. 2021-01-04 10:26:59 +01:00
gthr-single.h Update copyright years. 2021-01-04 10:26:59 +01:00
gthr.h Update copyright years. 2021-01-04 10:26:59 +01:00
libgcc-std.ver.in Update copyright years. 2021-01-04 10:26:59 +01:00
libgcc2.c Fix for powerpc64 long double complex divide failure 2021-10-03 18:07:06 -04:00
libgcc2.h Update copyright years. 2021-01-04 10:26:59 +01:00
libgcov-driver-system.c Update copyright years. 2021-01-04 10:26:59 +01:00
libgcov-driver.c gcov: make profile merging smarter 2021-10-13 15:26:58 +02:00
libgcov-interface.c Update copyright years. 2021-01-04 10:26:59 +01:00
libgcov-merge.c Restore profile reproducibility. 2021-01-25 13:30:34 +01:00
libgcov-profiler.c Update copyright years. 2021-01-04 10:26:59 +01:00
libgcov-util.c gcov: make profile merging smarter 2021-10-13 15:26:58 +02:00
libgcov.h gcov: make profile merging smarter 2021-10-13 15:26:58 +02:00
memcmp.c
memcpy.c
memmove.c
memset.c
mkheader.sh Update copyright years. 2021-01-04 10:26:59 +01:00
mkmap-flat.awk Update copyright years. 2021-01-04 10:26:59 +01:00
mkmap-symver.awk Update copyright years. 2021-01-04 10:26:59 +01:00
offloadstuff.c Update copyright years. 2021-01-04 10:26:59 +01:00
shared-object.mk Add the nvptx port. 2014-11-10 16:12:42 +00:00
siditi-object.mk
static-object.mk Add the nvptx port. 2014-11-10 16:12:42 +00:00
sync.c Update copyright years. 2021-01-04 10:26:59 +01:00
udivhi3.c Update copyright years. 2021-01-04 10:26:59 +01:00
udivmod.c Update copyright years. 2021-01-04 10:26:59 +01:00
udivmodhi4.c Update copyright years. 2021-01-04 10:26:59 +01:00
udivmodsi4.c Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-arm-common.inc Fix arm target build with inhibit_libc 2021-09-01 17:50:00 +02:00
unwind-c.c Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-compat.c Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-compat.h Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-dw2-fde-compat.c Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-dw2-fde-dip.c Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-dw2-fde.c Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-dw2-fde.h Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-dw2.c Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-dw2.h Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-generic.h Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-pe.h Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-seh.c Update copyright years. 2021-01-04 10:26:59 +01:00
unwind-sjlj.c Update copyright years. 2021-01-04 10:26:59 +01:00
unwind.inc libgcc: Fix backtrace fallback on PowerPC Big-endian 2021-11-11 15:29:25 +00:00
vtv_end.c Update copyright years. 2021-01-04 10:26:59 +01:00
vtv_end_preinit.c Update copyright years. 2021-01-04 10:26:59 +01:00
vtv_start.c Update copyright years. 2021-01-04 10:26:59 +01:00
vtv_start_preinit.c Update copyright years. 2021-01-04 10:26:59 +01:00