From owner-freebsd-hackers@freebsd.org Thu Oct 18 01:59:11 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 044B110E6B11 for ; Thu, 18 Oct 2018 01:59:11 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (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 979E8731A1 for ; Thu, 18 Oct 2018 01:59:10 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1D00222182 for ; Wed, 17 Oct 2018 21:59:10 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 17 Oct 2018 21:59:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h= subject:from:to:references:message-id:date:mime-version :in-reply-to:content-type; s=fm3; bh=gsh5Ufv+qkLqfJSOrN4/HCOmqd5 pjHFWM3YZznMFqtc=; b=eaxi0oqhOzOn+joYie4gNbEQWggg2bgZ6nKjjro9Nu9 sL8OlrmdklORsIEsrZCUjs+PTdIAXx4MXEZAujHONFYglLCiAEakKKMMU4PIa5Zx +iAz9L8V8eqshpZVw3L+cy0kbT9a5xmswnCKfIHz8sXpbzSB4g4qAavzcvGQodGL CnaK0XMxUvvO/8/Jao7Gr0TKVkQrDLElmexyqt1by6igH6JLtItBSN6RpYvE0UDn ytbFipw52atrhxWkQV5uHX+M3tKplWpd3e9QorRpt2jpPC8c+b8NkIOLDwn58g6Z wkZh1RFq/t4qdo9Ncfvh3qvH0Gbs/5GQmskJL596frg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=gsh5Uf v+qkLqfJSOrN4/HCOmqd5pjHFWM3YZznMFqtc=; b=H48FLgYFGOIbEtbvW6n+Ab Zm+LY8vaUFvNdPFIUrsEvfm9PE2Kx7iKAwf2FrHSIkeAcl3Hsl7vaphdpRE3b1ca fU+j1xLPwfmTaa4XZNOeOPtcrEH0uyEZtyTXbSewUyMDrsS71lzo4JcfCWnSJCAx u4Ea6kY0H6YrKezV+B201OOgfKO1LUF8bJKs2TQmghc65CyQ2NpbFsF1KgTnFrLD pJIJg3cP0bGtZ7Qpw9zScyw/1rpwjrs/4IFCqsKKH3O5PKVaYBJY/RYcBuvoJFO4 lGgEt/IYqNzWnMFV+uLxzVdHK1M7ZqhStcLxsnf6/wJQEpbz9abguKCHw4RdBiIA == X-ME-Sender: X-ME-Proxy: Received: from [192.168.1.2] (unknown [85.173.27.113]) by mail.messagingengine.com (Postfix) with ESMTPA id 7E2B9102E9 for ; Wed, 17 Oct 2018 21:59:08 -0400 (EDT) Subject: Re: embed endian info in locale data files magic (PR231965) From: Yuri Pankov To: freebsd-hackers References: Openpgp: preference=signencrypt Autocrypt: addr=yuripv@yuripv.net; keydata= xsBNBFu8u6IBCADB11gP0QwnorrHjqAtKLHKHNHskhy0s7jqJKfx0YqXgVBKGLJ9/mjLAz0F CBNvemHSDDTs0mEZ9cBKKi6cmsav6+UQgr//yai6hvXLBJqKchSFO4MhmdvBtsGFq1yKz5Zi uhjmimKyIpgBgvMdbgGbGq6cnSB2uEPmZuJr419SVRODOkXukU+F5WHgaHzDdHAIu1asCt2B +6msxqIqlFWcXyZyTGicTGGvC/PFIsVRUtD1dIJANTC876g7DTb7LZXWiWwJpSJ4GKMXMHVX Ct9BoQ4i3nhKbOxb6Io1wsy+NFyWsTJ9KYrxKKPJP3oG8BWb/cqlFqnE4e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OdGsE8KvorBFBB3zdK/GRt2Jy +jsnTfUWuQllbzMP0MfhCDMk1Mo8WvDH2/cOEP/yLKf20a+cd6nLs7bidjmGXo9pyuBKAtV6 Kv+VRu54AL+A/UBYu/eB3Dtvzcnut+1Zq6KaP++kUwPwINLIk04OBDwN0zRNTiqMAFYYyz2v ZHBB6E1th/l//ZC5b9Dk0ZpFI1bYdL9ymnrZe1MqbGPnDCToQxu00T/pZCm6Z92YrZQYuNwl Message-ID: Date: Thu, 18 Oct 2018 04:58:58 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1PLmTiomysntfNknvXhyS0R0pJqI4h7pF" 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 01:59:11 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1PLmTiomysntfNknvXhyS0R0pJqI4h7pF Content-Type: multipart/mixed; boundary="V7dAMGwHWZv6qJlfJX3KibuOQEFFSHKLP"; protected-headers="v1" From: Yuri Pankov To: freebsd-hackers Message-ID: Subject: Re: embed endian info in locale data files magic (PR231965) References: In-Reply-To: --V7dAMGwHWZv6qJlfJX3KibuOQEFFSHKLP Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable 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 buil= t > 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 Thinking more about this, or: 3. Always store the data in LE (or BE, doesn't matter), and appropriately convert while reading. This will likely require least chan= ge. > I have put the change for #2 together at > https://reviews.freebsd.org/D17603 (more a PoC at the moment than a rea= l > review), and wondering if it looks sane enough or if there's anything > obvious I'm missing. >=20 > 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. >=20 > TIA >=20 --V7dAMGwHWZv6qJlfJX3KibuOQEFFSHKLP-- --1PLmTiomysntfNknvXhyS0R0pJqI4h7pF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE+Gq3PsPeLT4tL/9wk4vgf7Eq4WwFAlvH6OIACgkQk4vgf7Eq 4WxjrggAhY+fwpVV+PI7cSvxAJayX5bf4qtXjploX2GsLcA/OK3ZpVFPtlPmgrHK P8tENd7U34pufS5lTrnov7Uv7OEWsiOtK890NyNQFYMeqWDdVsNIctzfteu2sR8c wUOvnEcZ6+uANDWH2owlB7K+caM1nhhkT184tlpKGM+RGoeg13OGEib9lcJvDvqQ 8e771orSth2wMNqFmamYlxGj/llx5OjCkj+nyjhN8c2eaAlxw2YbJoAEt7MF6axk +ZSrlbrxwEjeh9r4ifz2FowviHjw+4/kR0WGkLmIPvnVT7Sg+6pDbG76lHYQ/CuU 5eqOWDSqYajbi7Kb3qWEZuj+xCoEkw== =rtsl -----END PGP SIGNATURE----- --1PLmTiomysntfNknvXhyS0R0pJqI4h7pF--