[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT/NEWLIB PATCH 1/2] Makefile.uk: Fix link issues on arm64
On 15/01/2020 10:50, Felipe Huici wrote: Hi Julien, On 23.12.19, 19:06, "Minios-devel on behalf of Julien Grall" <minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx on behalf of julien@xxxxxxx> wrote: Hi,Title: how about "Makefile.uk: arm64: Add -D_HAVE_LONG_DOUBLE in thecflags"? Agreed, the commit title and message definitely needs reworking.On 20/12/2019 05:54, Jia He wrote:> Without this patch, when starting helloworld app with newlib on arm > kvm plat, it will report a link error as follows: > apps/helloworld.newlib/build/helloworld_kvm-arm64.o: In function `wcstold_l': > apps/helloworld.newlib/build/libnewlibc/origin/newlib-2.5.0.20170922/newlib/libc/stdlib/wcstold.c:77: undefined reference to `strtold_l' > apps/helloworld.newlib/build/libnewlibc/origin/newlib-2.5.0.20170922/newlib/libc/stdlib/wcstold.c:77:(.text+0x7c4e4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `strtold_l' > > I once did configure and build of newlib from uptream, this macro is > defined on my Thunderx2 armv8a server (Unbuntu 18.04 + gcc version 7.4.0)This message gives me the error but does not explain the root cause. Soit is not clear why -D_HAVE_LONG_DOUBLE solves the problem below. newlib's strtold.c compile-guards the definition of strtold_l (and other related functions) with the _HAVE_LONG_DOUBLE macro, this is why setting that flag fixes the linker error.But it feels slightly supicious to me that newlib would try to buildwcstold.c but not strtold.c (where strtold_l is included). So what is the exact problem? I think this has more to do with a mistake when porting newlib to Unikraft (i.e., in our Makefile.uk, which this patch fixes) than with newlib (i.e., newlib's build system correctly includes strtold_l by setting _HAVE_LONG_DOUBLE). Hope this clarifies things. Thank you for the clarification. Can this discussion be summarize in the commit message? Cheers, -- Julien Grall _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |