Hi Hongtao,

> On 8 Sep 2021, at 10:31, Hongtao Liu <crazy...@gmail.com> wrote:
> 
> On Wed, Sep 8, 2021 at 5:09 PM Jakub Jelinek <ja...@redhat.com> wrote:
>> 
>> On Wed, Sep 08, 2021 at 10:37:17AM +0800, Hongtao Liu wrote:
>>>  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.

this was applied as 
https://gcc.gnu.org/pipermail/gcc-cvs/2021-September/353114.html

but it seems that (at least on Linux and Darwin) we now see a lot of:

/src-local/gcc-master-patched/libgcc/shared-object.mk:14: warning: overriding 
commands for target `_divhc3.o'
Makefile:501: warning: ignoring old commands for target `_divhc3.o'
/src-local/gcc-master-patched/libgcc/shared-object.mk:17: warning: overriding 
commands for target `_divhc3_s.o’

and I think this is because we need to exclude the libgcc2  version of the 
functions before adding teh replacements, like the patch below.

tested on x86_64-linux, darwin observing that the __divhc3 and __mulh3 symbols 
are present and that the metadata for the source files indicates that they are 
the replacement sources.

OK for master?
Iain

——


[PATCH] 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 <i...@sandoe.co.uk>

libgcc/ChangeLog:

        * config/i386/t-softfp: Exclude libgcc2 versions of __divhc3
        and __mulhc3.
---
 libgcc/config/i386/t-softfp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libgcc/config/i386/t-softfp b/libgcc/config/i386/t-softfp
index 7620cc0cec5..fe2ad8a3c08 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))
 
-- 


Reply via email to