Re: disable-newlib-io-long-double?

Jim Wilson <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAFyWVaYg_53xd6cBj4=ND0E8BZVHHgQKLb8Ocx8MKVURMFpFOA@mail.gmail.com>
On Mon, Mar 16, 2020 at 6:34 PM chengzhiwei (C) <[email protected]> wrote:
> Check the file of vfprintf.c, I guess I found the reason:
> # ifdef _NO_LONGDBL
>                         if (flags & LONGDBL) {
>                                 _fpvalue = (double)GET_ARG (N, ap, _LONG_DOUBLE);
>                         } else {
>                                 _fpvalue = GET_ARG (N, ap, double);
>                         }
> There is an accuracy conversion step, but in my project, all of the long double symbols have been stripped away in libgcc.a, maybe I should patch the file of vfprintf.c.

Another option is --enable-newlib-nano-formatted-io which uses the
nano-vfprintf.c file instead of vprintf.c.  This drops more features
from vprintf, including the long double support.

You might want to look at github.com/riscv/riscv-gnu-toolchain for
comparison.  It builds a regular newlib and a newlib nano, where the
newlib nano uses --enable-newlib-nano-formatted-io,

Jim
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.