public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hongtao Liu <crazylht@gmail.com>
To: Iain Sandoe <iain@sandoe-acoustics.co.uk>
Cc: Jakub Jelinek <jakub@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] libgcc, i386: Export *hf* and *hc* from libgcc_s.so.1
Date: Sun, 19 Sep 2021 11:49:49 +0800	[thread overview]
Message-ID: <CAMZc-bzH+rV2hGyprUYe0Vw1J_Jg7dsKRGxjUbvFspNgUTdOig@mail.gmail.com> (raw)
In-Reply-To: <D5924E2D-F7E1-456A-AD0D-D3CD5D59C1E5@sandoe-acoustics.co.uk>

On Sunday, September 19, 2021, Iain Sandoe <iain@sandoe-acoustics.co.uk>
wrote:

> Hi Hongtao,
>
> > On 8 Sep 2021, at 10:31, Hongtao Liu <crazylht@gmail.com> wrote:
> >
> > On Wed, Sep 8, 2021 at 5:09 PM Jakub Jelinek <jakub@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?

Yes, thanks.

> 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 <iain@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))
>
> --
>
>
>

-- 
BR,
Hongtao

  reply	other threads:[~2021-09-19  3:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03  7:41 [PATCH] Explicitly add -msse2 to compile HF related libgcc source file liuhongt
2021-09-03  9:00 ` Jakub Jelinek
2021-09-03 12:32   ` Iain Sandoe
2021-09-03 12:33     ` Jakub Jelinek
2021-09-03 12:36       ` Iain Sandoe
2021-09-06  8:01         ` Jakub Jelinek
2021-09-06  1:42   ` Hongtao Liu
2021-09-06  7:08     ` Jakub Jelinek
2021-09-06  7:49       ` Iain Sandoe
2021-09-06  8:58         ` [PATCH] libgcc, i386: Export *hf* and *hc* from libgcc_s.so.1 Jakub Jelinek
2021-09-07 12:28           ` Jakub Jelinek
2021-09-08  0:54             ` Hongtao Liu
2021-09-08  2:37               ` Hongtao Liu
2021-09-08  9:09                 ` Jakub Jelinek
2021-09-08  9:31                   ` Hongtao Liu
2021-09-18 19:13                     ` Iain Sandoe
2021-09-19  3:49                       ` Hongtao Liu [this message]
2021-09-06  1:43   ` [PATCH] Explicitly add -msse2 to compile HF related libgcc source file Hongtao Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMZc-bzH+rV2hGyprUYe0Vw1J_Jg7dsKRGxjUbvFspNgUTdOig@mail.gmail.com \
    --to=crazylht@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe-acoustics.co.uk \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).