From 873854387865d18484bd0d39324773cd1e76df85 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 18 Sep 2021 17:08:42 +0100 Subject: Darwin, crts: Build Darwin10 unwinder shim as a library. We have a small unwinder shim that is only used for Darwin10 (and only then in quite specific cases). To avoid linking this code for every executable or DSO, we can present the crt as a convenience library (rather than a .o file). Signed-off-by: Iain Sandoe gcc/ChangeLog: * config/darwin.h (LINK_COMMAND_SPEC_A): Use Darwin10 unwinder shim as a convenience library. libgcc/ChangeLog: * config.host: Use convenience library for Darwin10 unwinder shim. * config/t-darwin: Build Darwin10 unwinder shim as a convenience library. --- libgcc/config.host | 2 +- libgcc/config/t-darwin | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/config.host b/libgcc/config.host index 432a3e1..6c34b13 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -215,7 +215,7 @@ case ${host} in *-*-darwin*) asm_hidden_op=.private_extern tmake_file="$tmake_file t-darwin ${cpu_type}/t-darwin t-libgcc-pic t-slibgcc-darwin" - extra_parts="crt3.o d10-uwfef.o crttms.o crttme.o" + extra_parts="crt3.o libd10-uwfef.a crttms.o crttme.o" ;; *-*-dragonfly*) tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" diff --git a/libgcc/config/t-darwin b/libgcc/config/t-darwin index 3b5e342..4b6317b 100644 --- a/libgcc/config/t-darwin +++ b/libgcc/config/t-darwin @@ -18,3 +18,9 @@ LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/config/unwind-dw2-fde-darwin.c \ # Patch to __Unwind_Find_Enclosing_Function for Darwin10. d10-uwfef.o: $(srcdir)/config/darwin10-unwind-find-enc-func.c $(crt_compile) -mmacosx-version-min=10.6 -c $< + +# Using this crt as a library means that it will not be added to an exe +# (or module) unless needed. +libd10-uwfef.a: d10-uwfef.o + $(AR_CREATE_FOR_TARGET) $@ d10-uwfef.o + $(RANLIB_FOR_TARGET) $@ -- cgit v1.1 From 1297a40fb331467c9ac841dee1c30b6716655517 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 18 Sep 2021 19:55:19 +0100 Subject: libgcc, X86: Exclude rules for libgcc2 __{div,mul}hc3. We want to override the libgcc2 generic version of these functions for X86. First exclude the original and the add in the replacements. Signed-off-by: Iain Sandoe libgcc/ChangeLog: * config/i386/t-softfp: Exclude libgcc2 versions of __divhc3 and __mulhc3. --- libgcc/config/i386/t-softfp | 1 + 1 file changed, 1 insertion(+) (limited to 'libgcc') diff --git a/libgcc/config/i386/t-softfp b/libgcc/config/i386/t-softfp index 7620cc0..fe2ad8a 100644 --- a/libgcc/config/i386/t-softfp +++ b/libgcc/config/i386/t-softfp @@ -2,6 +2,7 @@ LIB2ADD += $(srcdir)/config/i386/sfp-exceptions.c # Replace _divhc3 and _mulhc3. libgcc2-hf-functions = _divhc3 _mulhc3 +LIB2FUNCS_EXCLUDE += $(libgcc2-hf-functions) libgcc2-hf-extras = $(addsuffix .c, $(libgcc2-hf-functions)) LIB2ADD += $(addprefix $(srcdir)/config/i386/, $(libgcc2-hf-extras)) -- cgit v1.1 From ea4e901fa3ac09aa21e20bae460cbac70f9820e0 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 18 Sep 2021 20:17:06 +0100 Subject: libgcc, X86, Darwin: Handle symbols for HF cases. This reorganises the Darwin symbol vers files to include the generic ones at the top level; allowing for arch ports to override (via either exclusion or inclusion as needed). We add an X86-specific vers file containing the new HF symbols. Note that although Darwin does not use ELF-style symbol versioning - the parser that produces the map can consume it. Using the ELF-style description will help us know at which rev the symbols were introduced. Signed-off-by: Iain Sandoe libgcc/ChangeLog: * config/i386/t-darwin: Add in a vers file for X86-specific symbols. * config/t-darwin: Add the generic symbol maps here... * config/t-slibgcc-darwin: ... removing from here. * config/i386/libgcc-darwin.ver: New file. --- libgcc/config/i386/libgcc-darwin.ver | 21 +++++++++++++++++++++ libgcc/config/i386/t-darwin | 3 +++ libgcc/config/t-darwin | 3 +++ libgcc/config/t-slibgcc-darwin | 1 - 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 libgcc/config/i386/libgcc-darwin.ver (limited to 'libgcc') diff --git a/libgcc/config/i386/libgcc-darwin.ver b/libgcc/config/i386/libgcc-darwin.ver new file mode 100644 index 0000000..5224cdc --- /dev/null +++ b/libgcc/config/i386/libgcc-darwin.ver @@ -0,0 +1,21 @@ + + +%inherit GCC_12.0.0 GCC_7.0.0 +GCC_12.0.0 { + __divhc3 + __mulhc3 + __eqhf2 + __nehf2 + __extendhfdf2 + __extendhfsf2 + __extendhftf2 + __extendhfxf2 + __fixhfti + __fixunshfti + __floattihf + __floatuntihf + __truncdfhf2 + __truncsfhf2 + __trunctfhf2 + __truncxfhf2 +} diff --git a/libgcc/config/i386/t-darwin b/libgcc/config/i386/t-darwin index 5f2c697..c6b3aca 100644 --- a/libgcc/config/i386/t-darwin +++ b/libgcc/config/i386/t-darwin @@ -1,3 +1,6 @@ LIB2_SIDITI_CONV_FUNCS = yes LIB2ADD = $(srcdir)/config/darwin-64.c LIB2FUNCS_EXCLUDE = _fixtfdi _fixunstfdi _floatditf _floatunditf + +# Extra symbols for this port. +SHLIB_MAPFILES += $(srcdir)/config/i386/libgcc-darwin.ver diff --git a/libgcc/config/t-darwin b/libgcc/config/t-darwin index 4b6317b..14ae6b3 100644 --- a/libgcc/config/t-darwin +++ b/libgcc/config/t-darwin @@ -24,3 +24,6 @@ d10-uwfef.o: $(srcdir)/config/darwin10-unwind-find-enc-func.c libd10-uwfef.a: d10-uwfef.o $(AR_CREATE_FOR_TARGET) $@ d10-uwfef.o $(RANLIB_FOR_TARGET) $@ + +# Symbols for all the sub-ports. +SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/libgcc-libsystem.ver diff --git a/libgcc/config/t-slibgcc-darwin b/libgcc/config/t-slibgcc-darwin index a6ada45..60d6d17 100644 --- a/libgcc/config/t-slibgcc-darwin +++ b/libgcc/config/t-slibgcc-darwin @@ -24,7 +24,6 @@ SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) $(LDFLAGS) -dynamiclib -nodefaultlibs \ SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk SHLIB_MKMAP_OPTS = -v leading_underscore=1 -SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/libgcc-libsystem.ver SHLIB_VERPFX = $(srcdir)/config/$(cpu_type)/libgcc-darwin # we're only going to build the stubs if the target slib is /usr/lib -- cgit v1.1 From 32731fa5b0abf092029b8e2be64319b978bda514 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 18 Sep 2021 23:38:53 +0100 Subject: libgcc, Darwin: Remove unused symlinks. These were used on older systems to equate the FAT libgcc_s library to single-slice equivalents. Unused for any current system and never emitted by GCC. Signed-off-by: Iain Sandoe libgcc/ChangeLog: * config/t-slibgcc-darwin: Delete unused code. --- libgcc/config/t-slibgcc-darwin | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'libgcc') diff --git a/libgcc/config/t-slibgcc-darwin b/libgcc/config/t-slibgcc-darwin index 60d6d17..bd1e963 100644 --- a/libgcc/config/t-slibgcc-darwin +++ b/libgcc/config/t-slibgcc-darwin @@ -93,16 +93,6 @@ install-darwin-libgcc-stubs : for d in $(INSTALL_FILES) ; do \ $(INSTALL_DATA) $$d $(DESTDIR)$(slibdir)/$$d || exit 1 ; \ done - if [ -f $(DESTDIR)$(slibdir)/libgcc_s_ppc64.1.dylib ]; then \ - rm -f $(DESTDIR)$(slibdir)/libgcc_s_ppc64.1.dylib; \ - else true; fi - $(LN_S) libgcc_s.1.dylib \ - $(DESTDIR)$(slibdir)/libgcc_s_ppc64.1.dylib - if [ -f $(DESTDIR)$(slibdir)/libgcc_s_x86_64.1.dylib ]; then \ - rm -f $(DESTDIR)$(slibdir)/libgcc_s_x86_64.1.dylib; \ - else true; fi - $(LN_S) libgcc_s.1.dylib \ - $(DESTDIR)$(slibdir)/libgcc_s_x86_64.1.dylib else @@ -122,12 +112,4 @@ install-darwin-libgcc-links: $(LN_S) ../$$file $(gcc_objdir)$(MULTISUBDIR)/; \ done - rm -f $(gcc_objdir)$(MULTISUBDIR)/libgcc_s_x86_64.1.dylib - $(LN_S) libgcc_s.1.dylib \ - $(gcc_objdir)$(MULTISUBDIR)/libgcc_s_x86_64.1.dylib - - rm -f $(gcc_objdir)$(MULTISUBDIR)/libgcc_s_ppc64.1.dylib - $(LN_S) libgcc_s.1.dylib \ - $(gcc_objdir)$(MULTISUBDIR)/libgcc_s_ppc64.1.dylib - endif -- cgit v1.1 From 34fac9ef724ab7c1bee69aaa214327e2cb8bef30 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 20 Sep 2021 00:16:21 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index abd38fe..4a1b261 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,27 @@ +2021-09-19 Iain Sandoe + + * config/t-slibgcc-darwin: Delete unused code. + +2021-09-19 Iain Sandoe + + * config/i386/t-darwin: Add in a vers file for X86-specific + symbols. + * config/t-darwin: Add the generic symbol maps here... + * config/t-slibgcc-darwin: ... removing from here. + * config/i386/libgcc-darwin.ver: New file. + +2021-09-19 Iain Sandoe + + * config/i386/t-softfp: Exclude libgcc2 versions of __divhc3 + and __mulhc3. + +2021-09-19 Iain Sandoe + + * config.host: Use convenience library for Darwin10 + unwinder shim. + * config/t-darwin: Build Darwin10 unwinder shim as a + convenience library. + 2021-09-13 Andrew Pinski * config.host: Remove m32r-*-linux* and m32rle-*-linux*. -- cgit v1.1