Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Oct 2018 03:25:26 +0300
From:      Yuri Pankov <yuripv@yuripv.net>
To:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   embed endian info in locale data files magic (PR231965)
Message-ID:  <f081ab81-56d0-49cc-92b0-fadc09618d31@yuripv.net>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--RTL9UyG6YiKgof5xLKUFl5STeAOQNr1v0
Content-Type: multipart/mixed; boundary="5oxIDsZ06G3YJqyqE6v4e2eYEjCaO8uTB";
 protected-headers="v1"
From: Yuri Pankov <yuripv@yuripv.net>
To: freebsd-hackers <freebsd-hackers@freebsd.org>
Message-ID: <f081ab81-56d0-49cc-92b0-fadc09618d31@yuripv.net>
Subject: embed endian info in locale data files magic (PR231965)

--5oxIDsZ06G3YJqyqE6v4e2eYEjCaO8uTB
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231965 ([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


--5oxIDsZ06G3YJqyqE6v4e2eYEjCaO8uTB--

--RTL9UyG6YiKgof5xLKUFl5STeAOQNr1v0
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEE+Gq3PsPeLT4tL/9wk4vgf7Eq4WwFAlvH0vYACgkQk4vgf7Eq
4Wy+XQf8DvLLWf5bYetZTJiTR7vlNSiZQLxjbF72CDcq60puz7mmCmGLlqUCYsSZ
3uPpU0G90LpQ8hY95Y1RvCX8MXet7YheiOxv550jvCkER9khiGCHILjkGVG+P2ae
DJLuB/aKI/+q4WyKRC7IF+y3Yk/WaLymkEIy984buR/0H9fTpbVtlB8TPQQz/qm2
olNXa+SP2xTFJPP0lEd+V92k8kqLk0fS+uLwOUmlEjUoqrr20uQrGtRaPhXGVvmg
5WfVF8JU63vHUL2AC5lpKwmW7CzOKJj2p0dEFkLPtHVyNE6IVYxc/jPRg8GTef0B
FgLBI0xLxu2Ui7dLOyRue8MwxFPknA==
=sll+
-----END PGP SIGNATURE-----

--RTL9UyG6YiKgof5xLKUFl5STeAOQNr1v0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f081ab81-56d0-49cc-92b0-fadc09618d31>