From owner-freebsd-hackers@freebsd.org Thu Oct 18 17:14:52 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 8B542EFB95B for ; Thu, 18 Oct 2018 17:14:52 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AEEA73D7C; Thu, 18 Oct 2018 17:14:52 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id EDC553C475F; Thu, 18 Oct 2018 17:14:50 +0000 (UTC) Date: Thu, 18 Oct 2018 17:14:50 +0000 From: Brooks Davis To: Baptiste Daroussin Cc: Yuri Pankov , freebsd-hackers Subject: Re: embed endian info in locale data files magic (PR231965) Message-ID: <20181018171450.GA18726@spindle.one-eyed-alien.net> References: <20181018075728.sxbvrtnqorrieuu2@ivaldir.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a8Wt8u1KmwUX3Y2C" Content-Disposition: inline In-Reply-To: <20181018075728.sxbvrtnqorrieuu2@ivaldir.net> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 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 17:14:52 -0000 --a8Wt8u1KmwUX3Y2C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 18, 2018 at 09:57:29AM +0200, Baptiste Daroussin wrote: > 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 ([PowerPC6= 4] > > > Cross compiling powerpc64 from amd64 results in nonfunctional locale > > > installations), describes the issue with locale data built on LE syst= em > > > (amd64) when used on BE system (powerpc). > > >=20 > > > Fix introduced in rS308170 depends on the fact that locale data is bu= ilt > > > 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 signatu= re) > > > 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 ch= ange. > >=20 > I agree on that approach, just some benchmarking would be needed to make = sure > we are not killing the performance While not a bad idea, we should probably focus on benchmarking modern power systems. None of the other BE systems are all that important IMO (I say this as someone who uses BE mips64 daily.) -- Brooks --a8Wt8u1KmwUX3Y2C Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbyL+KAAoJEKzQXbSebgfA9m0H/3tvNTIPY/necEPmXnUUwffR lpkmz/AQoVRjgqo+VSxcmliPya0++o+jMHck1/c4yROZwAkBzZ5RugEnu5LT7tRX hgOfsqcpGm6jQA571di5S2gFfIQybgYvv/mDUU/PFygf4lnMS2kaD5uFg9BjRbo5 b1mYHED7YhKZdEZcAcriQJbqIYa9xwios8BkX37Ggsm0upuA2uLsQfHQ8xpuNezf N9piug6lr9FYtdAUkWgH0hBo37lYEgttQPux4+V0oSASre6bGvaOv/YpQxVGccQf bG0hbUm4zQni3H84r+S+AejmEMbSM+C8WgKN8Daw//efwh3Ot223z3qH3B9Ehco= =rMcS -----END PGP SIGNATURE----- --a8Wt8u1KmwUX3Y2C--