On Wed, Sep 8, 2021 at 8:54 AM Hongtao Liu <crazy...@gmail.com> wrote: > > On Tue, Sep 7, 2021 at 8:29 PM Jakub Jelinek via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: > > > > On Mon, Sep 06, 2021 at 10:58:53AM +0200, Jakub Jelinek via Gcc-patches > > wrote: > > > On Mon, Sep 06, 2021 at 08:49:27AM +0100, Iain Sandoe wrote: > > > > > Ok. The *.ver changes are still needed (see above), but that can be > > > > > done > > > > > incrementally. > > > > > > > > I can commit the .ver change if that’s approved, sure - for the record > > > > I haven’t checked > > > > any targets other than Darwin and Linux. > > > > > > The following patch exports it for Linux from config/i386/*.ver where it > > > IMNSHO belongs, aarch64 already exports some of those at GCC_11* and other > > > targets might add them at completely different gcc versions. > > > > > > Tested on x86_64-linux, verified the right symbols are exported, ok for > > > trunk? > > > > Bootstrapped/regtested on x86_64-linux and i686-linux successfully, though > > actually __divhc3 and __mulhc3 aren't exported, they aren't even compiled > > into libgcc_s.so.1. Is that on purpose (large functions very unlikely being > > used in most of the programs)? If yes, I'll drop the __divhc3/__mulhc3 > > lines. If not, > > LIB2ADD_ST += $(addprefix $(srcdir)/config/i386/, $(libgcc2-hf-extras)) > > should be changed to > > LIB2ADD += $(addprefix $(srcdir)/config/i386/, $(libgcc2-hf-extras)) > > (untested), or even the LIB2FUNCS_EXCLUDE dropped? I was worried w/o this, there would be a duplicate definition error, but it's not, so removed. > > > I think it's not, let me try to verify it. > > > 2021-09-06 Jakub Jelinek <ja...@redhat.com> > > > Iain Sandoe <i...@sandoe.co.uk> > > > > > > * config/i386/libgcc-glibc.ver: Add %inherit GCC_12.0.0 GCC_7.0.0 > > > and export *hf* and *hc* functions at GCC_12.0.0. > > > > > > --- libgcc/config/i386/libgcc-glibc.ver.jj 2021-01-05 > > > 00:13:58.142298913 +0100 > > > +++ libgcc/config/i386/libgcc-glibc.ver 2021-09-06 > > > 10:47:52.244726676 +0200 > > > @@ -194,3 +194,23 @@ GCC_4.8.0 { > > > __cpu_indicator_init > > > } > > > %endif > > > + > > > +%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 > > > +} > > > > Jakub > > > > > -- > BR, > Hongtao
Bootstrapped and regtested on x86_64-linux-gnu{-m32,}. Ok for trunk? libgcc/ChangeLog: * config/i386/t-softfp: Compile __{mul,div}hc3 into libgcc_s.so.1. --- libgcc/config/i386/t-softfp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libgcc/config/i386/t-softfp b/libgcc/config/i386/t-softfp index 2363ea17194..7620cc0cec5 100644 --- a/libgcc/config/i386/t-softfp +++ b/libgcc/config/i386/t-softfp @@ -2,9 +2,8 @@ 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_ST += $(addprefix $(srcdir)/config/i386/, $(libgcc2-hf-extras)) +LIB2ADD += $(addprefix $(srcdir)/config/i386/, $(libgcc2-hf-extras)) softfp_extensions := hfsf hfdf hftf hfxf sfdf sftf dftf xftf softfp_truncations := tfhf xfhf dfhf sfhf tfsf dfsf tfdf tfxf -- 2.27.0 -- BR, Hongtao