]> xenbits.xensource.com Git - unikraft/libs/libcxx.git/commitdiff
patches: Define strtof_l and strtod_l in locale
authorMaria Sfiraiala <maria.sfiraiala@gmail.com>
Sun, 30 Oct 2022 18:22:23 +0000 (20:22 +0200)
committerUnikraft <monkey@unikraft.io>
Fri, 18 Nov 2022 10:19:17 +0000 (10:19 +0000)
When compiled for Aarch64, apps using libcxx fail due to strtof_l and
strtod_l not being defined in include/locale.

This commit adds a patch which includes the header that contains
the definitions in include/locale.

It also modifies Makefile.uk to add the file in the build process.

Signed-off-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #10

Makefile.uk
patches/0009-Add-strtof_l-strtod_l-header.patch [new file with mode: 0644]

index e185a60fcab8cc4c654528726508df73466ab9cf..d24341d75c977f79e76884f5e6d158d50397188d 100644 (file)
@@ -89,6 +89,8 @@ CXXINCLUDES-$(CONFIG_LIBCXX) += -I$(LIBCXX_SRC)/utils
 ifeq ($(CONFIG_LIBMUSL),y)
 CINCLUDES-$(CONFIG_LIBCXX) += -I$(LIBCXX_SRC)/include/support/musl
 CXXINCLUDES-$(CONFIG_LIBCXX) += -I$(LIBCXX_SRC)/include/support/musl
+CINCLUDES-$(CONFIG_LIBCXX) += -I$(LIBCXX_SRC)/include/support/xlocale
+CXXINCLUDES-$(CONFIG_LIBCXX) += -I$(LIBCXX_SRC)/include/support/xlocale
 endif
 
 ################################################################################
diff --git a/patches/0009-Add-strtof_l-strtod_l-header.patch b/patches/0009-Add-strtof_l-strtod_l-header.patch
new file mode 100644 (file)
index 0000000..7d7f829
--- /dev/null
@@ -0,0 +1,23 @@
+From c924cd52b45e2ab32368ca011a8f51a3e561d088 Mon Sep 17 00:00:00 2001
+From: Maria Sfiraiala <maria.sfiraiala@gmail.com>
+Date: Sun, 30 Oct 2022 20:00:39 +0200
+Subject: [PATCH] Add strtof_l, strtod_l header
+
+Signed-off-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
+---
+diff --git a/include/locale b/include/locale
+index c9ec7c36f582..9068f88117a7 100644
+--- a/include/locale
++++ b/include/locale
+@@ -817,6 +817,8 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
+     return 0;
+ }
++#include <__strtonum_fallback.h>
++
+ template <class _Tp>
+ _LIBCPP_INLINE_VISIBILITY
+ _Tp __do_strtod(const char* __a, char** __p2);
+-- 
+2.25.1
+