[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
Hi,Title: how about "Makefile.uk: arm64: Add -D_HAVE_LONG_DOUBLE in the cflags"? 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. So it is not clear why -D_HAVE_LONG_DOUBLE solves the problem below. But it feels slightly supicious to me that newlib would try to build wcstold.c but not strtold.c (where strtold_l is included). So what is the exact problem? Signed-off-by: Jia He <justin.he@xxxxxxx> --- Makefile.uk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.uk b/Makefile.uk index 17d8d7a..377815c 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -85,9 +85,12 @@ LIBNEWLIB_GLOBAL_FLAGS-y += -DMISSING_SYSCALL_NAMES -DMALLOC_PROVIDED LIBNEWLIB_GLOBAL_FLAGS-y += -D_POSIX_REALTIME_SIGNALS LIBNEWLIB_GLOBAL_FLAGS-$(CONFIG_LIBNEWLIBC_WANT_IO_C99_FORMATS) += -D_WANT_IO_C99_FORMATS LIBNEWLIB_GLOBAL_FLAGS-$(CONFIG_LIBNEWLIBC_LINUX_ERRNO_EXTENSIONS) += -D__LINUX_ERRNO_EXTENSIONS__ +ifeq ($(CONFIG_ARCH_ARM_64),y) +LIBNEWLIB_GLOBAL_FLAGS-y += -D_HAVE_LONG_DOUBLE +endif ifeq ($(CONFIG_ARCH_X86_64),y) -LIBNEWLIB_GLOBAL_FLAGS-y += -D_LDBL_EQ_DBL LIBNEWLIB_GLOBAL_FLAGS-y += -D_HAVE_LONG_DOUBLE +LIBNEWLIB_GLOBAL_FLAGS-y += -D_LDBL_EQ_DBL This looks a spurious change. endifCFLAGS-y += $(LIBNEWLIB_GLOBAL_FLAGS-y) 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 |