Yuri Pankov
2018-10-18 00:25:26 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231965 ([PowerPC64]
Cross compiling powerpc64 from amd64 results in nonfunctional locale
installations), describes the issue with locale data built on LE system
(amd64) when used on BE system (powerpc).
Fix introduced in rS308170 depends on the fact that locale data is built
on LE system, and will likely fail when it's built natively on mips
(please correct me if I'm wrong). More so, we shouldn't be hardcoding
the conversion in libc, and I see 2 options here:
1. fix localedef to output data in target's system endian
2. embed the endian info in locale data files (updating magic signature)
and ehhance the previous fix with runtime selection of needed
conversion
I have put the change for #2 together at
https://reviews.freebsd.org/D17603 (more a PoC at the moment than a real
review), and wondering if it looks sane enough or if there's anything
obvious I'm missing.
I have briefly tested the libc and locale files (LC_CTYPE and
LC_COLLATE) built on amd64 on a powerpc system, and it seems to work.
TIA
Cross compiling powerpc64 from amd64 results in nonfunctional locale
installations), describes the issue with locale data built on LE system
(amd64) when used on BE system (powerpc).
Fix introduced in rS308170 depends on the fact that locale data is built
on LE system, and will likely fail when it's built natively on mips
(please correct me if I'm wrong). More so, we shouldn't be hardcoding
the conversion in libc, and I see 2 options here:
1. fix localedef to output data in target's system endian
2. embed the endian info in locale data files (updating magic signature)
and ehhance the previous fix with runtime selection of needed
conversion
I have put the change for #2 together at
https://reviews.freebsd.org/D17603 (more a PoC at the moment than a real
review), and wondering if it looks sane enough or if there's anything
obvious I'm missing.
I have briefly tested the libc and locale files (LC_CTYPE and
LC_COLLATE) built on amd64 on a powerpc system, and it seems to work.
TIA