Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Oct 2018 22:21:05 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Yuri Pankov <yuripv@yuripv.net>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: embed endian info in locale data files magic (PR231965)
Message-ID:  <CANCZdfpuUhJTxeUrEn1jrphSVaPqWw86Xm-e-rdX_mwC_kJO9w@mail.gmail.com>
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
On Wed, Oct 17, 2018 at 10:18 PM Yuri Pankov <yuripv@yuripv.net> 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 like this.

Warner



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