disable-newlib-io-long-double?
Jim Wilson
jimw@sifive.com
Tue Mar 17 18:10:06 GMT 2020
On Mon, Mar 16, 2020 at 6:34 PM chengzhiwei (C) <chengzhiwei6@huawei.com> 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
More information about the Newlib
mailing list