|
Message-ID: <CAOUaTh_8mvhmu-myKe8JijWjpgfJnQrwhk2Yv2eTCY4hb_XtXQ@mail.gmail.com>
Date: Fri, 25 Feb 2022 16:21:59 +0100
From: SIMONE MIONE <205212@...denti.unimore.it>
To: Rich Felker <dalias@...c.org>
Cc: noloader@...il.com, musl@...ts.openwall.com
Subject: Re: musl how to use hard float with aarch64-none-elf-gcc
And what if I don't want quad precision?
I mean, when I try to print a float, vfprintf casts the float to a double
(and that's ok), but it seems like musl uses double as long double, so it
tries to cast the double to long double.
Is it true? Can I use a double (or float) as a double precision instead of
quad precision?
Il giorno mer 16 feb 2022 alle ore 15:57 Rich Felker <dalias@...c.org> ha
scritto:
> On Wed, Feb 16, 2022 at 12:59:13PM +0100, SIMONE MIONE wrote:
> > Thank you all for your reply.
> > I meant when I add musl's lib*.a into my makefile, the compiler complains
> > about "undefined reference to __addtf3" (and others). Isn't that
> > soft-float? Or emulation float?
>
> It's the implementation of long double which is IEEE quad in the
> aarch64 ABI.
>
> > My supervisor told me "we already have float implementation so we don't
> > need those functions". So I was wondering if I need to disable it in some
> > way.
>
> No, you need them because there is no fpu implementation of quad.
>
>
> > Il giorno mer 16 feb 2022 alle ore 12:32 Jeffrey Walton <
> noloader@...il.com>
> > ha scritto:
> >
> > > On Wed, Feb 16, 2022 at 6:29 AM Szabolcs Nagy <nsz@...t70.net> wrote:
> > > >
> > > > * Jeffrey Walton <noloader@...il.com> [2022-02-16 05:24:48 -0500]:
> > > > > On Wed, Feb 16, 2022 at 4:51 AM SIMONE MIONE <
> > > 205212@...denti.unimore.it> wrote:
> > > > > >
> > > > > > I am trying to integrate musl in a baremetal environment. I
> already
> > > have float support but I can't manage to disable soft-float by musl.
> > > > > >
> > > > > > I configure with:
> > > > > > ./configure --target=aarch64-none-elf --enable-debug
> --disable-shared
> > > > > > And simple compile with:
> > > > > > make
> > > > > >
> > > > > > Does anyone know how to use hardfloat instead of soft float? Is
> > > there any option or flag? Thank you
> > > > >
> > > > > The GCC options for hard-floats are -mfpu=neon -mfloat-abi=hard. In
> > > > > later versions of GCC, you can also use -mfpu=auto (sometimes).
> > > >
> > > > that's for 32bit arm
> > > >
> > > > there is no soft float abi for aarch64, so i'm not sure what's going
> on.
> > >
> > > Oh, you're right My bad. I did not notice it was Aarch64.
> > >
> > > Jeff
> > >
>
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.