Date: Thu, 18 Oct 2018 09:57:29 +0200 From: Baptiste Daroussin <bapt@FreeBSD.org> To: Yuri Pankov <yuripv@yuripv.net> Cc: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: embed endian info in locale data files magic (PR231965) Message-ID: <20181018075728.sxbvrtnqorrieuu2@ivaldir.net> In-Reply-To: <abaa1192-defc-973e-8d0f-b8e5a2437c0d@yuripv.net> References: <f081ab81-56d0-49cc-92b0-fadc09618d31@yuripv.net> <abaa1192-defc-973e-8d0f-b8e5a2437c0d@yuripv.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--jkvypxlwu4xz5ve5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 18, 2018 at 04:58:58AM +0300, Yuri Pankov wrote: > Yuri Pankov wrote: > > 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). > >=20 > > 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: > >=20 > > 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 >=20 > Thinking more about this, or: >=20 > 3. Always store the data in LE (or BE, doesn't matter), and > appropriately convert while reading. This will likely require least chan= ge. >=20 I agree on that approach, just some benchmarking would be needed to make su= re we are not killing the performance Best regards, Bapt --jkvypxlwu4xz5ve5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlvIPMMACgkQY4mL3PG3 PlpLqg/+PnpFP8OZ0lB97JD9lAdk+gkyMQ6FS8s9z4lBrfUReMcC9QOGJGmMHPTx nD3Gb6XeQFwi89W9KDPJnI0h1L7nowDULyp8bAqeTO0QMEkESWb9VnvnmrGLbg/0 zrRRaxXuZnRcOTiSMGaXh01ENv9+G9Ja/FCF1xadbk0oTwiR9/Lt58Fr6zV83RmY Pu6lxQI+xrWR04l5ORtovvv19DutZ0GhO/oEFzqy8n+Qa4KnFFxtCxf+ioNaQHRX zwf4ATutmesaIGd+Y46GtpyQCN07P+lLbfaRxDqoXPjjjACpqa5qFXi7ZauVRnVW aZdZyE67jKO+fUaInUn7H6q4NKLcHzIwDkk6RhDsn1Uxaa1deorJ2CTmUbLOQsiF hPy+E3DavLLL8QiwlF7n75oCSqaYbBxKxf8Q314PGymjzzlCLk2KSKeAAfRpUxt+ VtlH/pq7kYF6iy5qCKTluoIW+vj0PLpsLXi9CnadcknhlOsGMfg3YGCjkOvOMz5p wSFxjqaypsM2+oUNp99byb8HrPSR4K8PHAGr/StBbH/lGTCM4ubP7t0vQVaXQ5ez adG7v3kWFu1sgW83coHYiLc6oTRXPo3/q6/oTXUZaKtOMR0Pf+aJzP/uulnd8zWE sp6mFG8kaqX86HrF+f0pb8Z+8z+KxOJtN3Yh4SZxJviyK5n6iTM= =fX4N -----END PGP SIGNATURE----- --jkvypxlwu4xz5ve5--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181018075728.sxbvrtnqorrieuu2>