disable-newlib-io-long-double?
Jim Wilson
jimw@sifive.com
Mon Mar 16 20:50:34 GMT 2020
On 3/16/20 4:37 AM, chengzhiwei (C) wrote:
> In my project, all of the quadrature symbols have been stripped away in libgcc.a, so when I built newlib toolchain based on riscv32 target, we used the option "--disable-newlib-io-long-double" to turn off the feature of long double. But when performing a floating-point calculation, the symbol "trunctfdf2" is not defined correctly:
> libc.a(lib_a-vfprintf.o): in function `.L60':vfprintf.c:(.text+0x3fe): undefined reference to `__trunctfdf2'
--disable-newlib-io-long-double is the default. That configure option
shouldn't do anything.
__trunctfdf2 comes from libgcc. Are you linking with libgcc?
Of course, if you have long double disabled, it is odd that you get a
call to trunctfdf2. You should check how the vfprintf.c file was
compiled. There is a _NO_LONGDBL that should be defined by default, and
should prevent any long double code from being enabled in that file.
Jim
More information about the Newlib
mailing list