From owner-freebsd-hackers@freebsd.org Thu Oct 18 07:57:30 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 989C410D2C3E for ; Thu, 18 Oct 2018 07:57:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BFC68110E; Thu, 18 Oct 2018 07:57:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 30A7F1277F; Thu, 18 Oct 2018 07:57:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 2EE738C333; Thu, 18 Oct 2018 09:57:29 +0200 (CEST) Date: Thu, 18 Oct 2018 09:57:29 +0200 From: Baptiste Daroussin To: Yuri Pankov Cc: freebsd-hackers Subject: Re: embed endian info in locale data files magic (PR231965) Message-ID: <20181018075728.sxbvrtnqorrieuu2@ivaldir.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jkvypxlwu4xz5ve5" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2018 07:57:30 -0000 --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--