diff mbox series

[1/4] site/common-glibc: Set gnulib locale variables

Message ID 20260918172031.2871246-1-richard.purdie@linuxfoundation.org
State New
Headers show
Series [1/4] site/common-glibc: Set gnulib locale variables | expand

Commit Message

Richard Purdie Sept. 18, 2026, 5:20 p.m. UTC
These locale variables are determined by running test binaries. Our sysroots
don't really set up locales properly and the results vary depending on the
host architecture and the locales installed.

Fix the values to a known set of locales that could be installed if the
user does so which is at least determinsitic. These are selected so the m4
recipe ptests run successfully.

An extra mbrtoc32 macro needs to also be set to have zh_CN work correctly on target.

We still need the musl equivalent to this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/site/common-glibc | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/meta/site/common-glibc b/meta/site/common-glibc
index 29f96da48d6..4dbfb4cb57f 100644
--- a/meta/site/common-glibc
+++ b/meta/site/common-glibc
@@ -67,9 +67,19 @@  gl_cv_func_mbrtowc_sanitycheck=${gl_cv_func_mbrtowc_sanitycheck=yes}
 gl_cv_func_mbrtowc_null_arg=${gl_cv_func_mbrtowc_null_arg=yes}
 gl_cv_func_mbrtowc_retval=${gl_cv_func_mbrtowc_retval=yes}
 gl_cv_func_mbrtowc_nul_retval=${gl_cv_func_mbrtowc_nul_retval=yes}
+gl_cv_func_mbrtoc32_utf8_locale_works=yes
 
 # va_copy and _va_copy
 ac_cv_va_copy=${ac_cv_va_copy=yes}
 ac_cv___va_copy=${ac_cv___va_copy=yes}
 ac_cv_func_va_copy=${ac_cv_func_va_copy=yes}
 ac_cv_func___va_copy=${ac_cv_func___va_copy=yes}
+
+# gnulib locale-en.m4 and friends look at the sysroot or host locales
+# we need something deterministic
+gt_cv_locale_en_utf8=en_US.UTF-8
+gt_cv_locale_fr=fr_FR.iso88591
+gt_cv_locale_fr_utf8=fr_FR.UTF-8
+gt_cv_locale_zh_CN=zh_CN.GB18030
+gt_cv_locale_ja=ja_JP.euc_jp
+gt_cv_locale_tr_utf8=tr_TR.UTF-8