Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Oct 2018 17:14:50 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Baptiste Daroussin <bapt@FreeBSD.org>
Cc:        Yuri Pankov <yuripv@yuripv.net>, freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: embed endian info in locale data files magic (PR231965)
Message-ID:  <20181018171450.GA18726@spindle.one-eyed-alien.net>
In-Reply-To: <20181018075728.sxbvrtnqorrieuu2@ivaldir.net>
References:  <f081ab81-56d0-49cc-92b0-fadc09618d31@yuripv.net> <abaa1192-defc-973e-8d0f-b8e5a2437c0d@yuripv.net> <20181018075728.sxbvrtnqorrieuu2@ivaldir.net>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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=231965 ([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
> > 
> > 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 change.
> > 
> 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

[-- Attachment #2 --]
-----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-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181018171450.GA18726>