public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Joel Sherrill <joel@rtems.org>
To: Jeff Johnston <jjohnstn@redhat.com>
Cc: newlib@sourceware.org, Jennifer Averett <jennifer.averett@oarcorp.com>
Subject: Re: [PATCH 0/3]: Add math support for non LDBL_EQ_DBL architecture
Date: Wed, 5 Apr 2023 16:34:56 -0500	[thread overview]
Message-ID: <CAF9ehCWuOYXMmDDKzj4wt53c7s5Wk246XcdY=wt=YT84CP9w6A@mail.gmail.com> (raw)
In-Reply-To: <CAOox84t=9-y7A-tz=TBQKLQojO1oO7WVXNs-0aC4kt=dJ5Ewwg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3402 bytes --]

On Wed, Apr 5, 2023 at 3:12 PM Jeff Johnston <jjohnstn@redhat.com> wrote:

> See below.
>
> On Wed, Apr 5, 2023 at 5:24 AM Corinna Vinschen <vinschen@redhat.com>
> wrote:
>
> > Hi Jennifer,
> >
> > On Apr  3 15:58, Jennifer Averett wrote:
> > > The attached set of patches add long double support for i386, aarch64
> > and
> > > x86_64.  The riscv and powerpc are supported by FreeBSD but will need
> > more
> > > work to be supported by newlib.  FreeBSD has separate 64 and 32 bit
> > powerpc
> > > support which would have to be integrated for newlib. FreeBSD riscv
> > support
> > > is 64 and there are issues with fenv.h that would have to be addressed.
> >
> > Thanks for your patchset, it looks pretty well to me, though I like
> > to have input on this from my co-maintainer Jeff, too.
> >
>
> Looks good.  I do have a comment about how the flag checks should not be
> removed in math.h.  The _REENT_ONLY checking should still be honored as
> well as
> the m68k flag: __math_68881.


OK. Jennifer can revert that part of the patch.


> There could be platforms where long double is
> supported (possibly doubles are 32 bits and long double is 64 bits), but
> there are only the 3 platforms that have the machine support headers at
> present.  As well, from ieeefp.h there are other
> LDBL_MANT_DIG possibilities mentioned (e.g. 53, 65, 112) which the new code
> cannot handle.
>

Agreed. We did not go on a quest to support everything at first. It may be
possible to  provide a generic _fpmath.h which wraps ieeefp.h which could
enable a few more architectures.

And there is nothing stopping someone from adding more ldNN directories.

I think the riscv and ppc should be possible to add from the FreeBSD code
but it will take more architecture specific tinkering than we were willing
to
do in this initial patch.

I'm not disagreeing with you at all. Just saying we took a first step and
did all the architectures which were straightforward. Plenty of opportunity
for follow up.


>
> > I noticed that you exclude Cygwin from the new code, which makes sense
> > as long as we provide our own long double math taken from Mingw-w64.
> >
> > However, there's something not quite right.  When trying to build I get
> > symbol conflicts for the fdim{f,l} and scalbln{f,l} symbols in the link
> > stage (paths shortend for readability):
> >
> > ld: libm.a(libm_a-s_fdim.o): in function `fdimf':
> > newlib/libm/ld/s_fdim.c:47: multiple definition of `fdimf';
> > libm.a(libm_a-sf_fdim.o):newlib/libm/common/sf_fdim.c:16: first defined
> here
> >
> > ld: libm.a(libm_a-s_fdim.o): in function `fdiml':
> > newlib/libm/ld/s_fdim.c:48: multiple definition of `fdiml';
> > libdll.a(fdiml.o):winsup/cygwin/math/fdiml.c:11: first defined here
> >
> > ld: libm.a(libm_a-s_scalbln.o): in function `scalblnf':
> > newlib/libm/ld/s_scalbln.c:46: multiple definition of `scalblnf';
> > libm.a(libm_a-sf_scalbln.o):newlib/libm/common/sf_scalbln.c:34: first
> > defined here
> >
> > ld: libm.a(libm_a-s_scalbln.o): in function `scalblnl':
> > newlib/libm/ld/s_scalbln.c:53: multiple definition of `scalblnl';
> > libdll.a(scalbnl.o):winsup/cygwin/scalbnl.S:19: first defined here
> >
> > The conflicts really ony occur for these four functions.  Any chance
> > to fix these?
> >
> >
> > Thanks,
> > Corinna
> >
> >
>

      reply	other threads:[~2023-04-05 21:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03 20:58 Jennifer Averett
2023-04-03 20:58 ` [PATCH 1/3] newlib: Add FreeBSD files for non LDBL_EQ_DBL support Jennifer Averett
2023-04-03 20:58 ` [PATCH 2/3] newlib: Add non LDBL_EQ_DBL math support for aarch64, i386, and x86_64 Jennifer Averett
2023-04-03 20:58 ` [PATCH 3/3] newlib: Regenerated source for adding non LDBL_EQ_DBL math methods Jennifer Averett
2023-04-05  9:23 ` [PATCH 0/3]: Add math support for non LDBL_EQ_DBL architecture Corinna Vinschen
2023-04-05 15:44   ` Joel Sherrill
2023-04-06  9:00     ` Corinna Vinschen
2023-04-06 14:06       ` Joel Sherrill
2023-04-06 16:23         ` Corinna Vinschen
2023-04-05 20:12   ` Jeff Johnston
2023-04-05 21:34     ` Joel Sherrill [this message]

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='CAF9ehCWuOYXMmDDKzj4wt53c7s5Wk246XcdY=wt=YT84CP9w6A@mail.gmail.com' \
    --to=joel@rtems.org \
    --cc=jennifer.averett@oarcorp.com \
    --cc=jjohnstn@redhat.com \
    --cc=newlib@sourceware.org \
    /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).