This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Wrong unconditional dependency on nanl


Hello,

On aarch64 I've notice that a simple hello.c fails to link against
current newlib master:
.../aarch64-elf/libc/usr/lib/libc.a(lib_a-strtorx.o): In function `ULtox':
.../newlib/libc/stdlib/strtorx.c:92: undefined reference to `nanl'

It seems to me that an unconditional dependency on nanl() was
introduced by commit
6c212a8b7873703c4f98c6b68579b234918be83a
Author: Masamichi Hosoda <trueroad@trueroad.jp>
Date:   Thu Aug 16 09:18:50 2018 +0900
    Fix strtod ("nan") and strtold ("nan") returns wrong negative NaN

but I'm not sure how to fix this as I did not follow the discussion
around this patch.

It seems to me that nanl() is only defined if _LDBL_EQ_DBL
(newlib/libm/common/nanl.c), but the patch above introduces a call to
nanl() in a code path where !defined (_LDBL_EQ_DBL)

This I suspect the problem is present on other targets, too ?

Christophe


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]