This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: Enable multi-arch support for i386
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 17 Aug 2015 15:20:24 +0000
- Subject: Re: RFC: Enable multi-arch support for i386
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOoa3DjbpT4O+y4wgLP3MKR=R_x=3z-bw8FFkpaw5uVnpw at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1508171502020 dot 29836 at digraph dot polyomino dot org dot uk> <CAMe9rOowMPxasupdRxMakbw34-_3V9xOWgsuYuUd9Bmuanubzw at mail dot gmail dot com>
On Mon, 17 Aug 2015, H.J. Lu wrote:
> On Mon, Aug 17, 2015 at 8:06 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> > On Mon, 17 Aug 2015, H.J. Lu wrote:
> >
> >> Since _dl_x86_cpu_features is available for i386 now, we can
> >> move sysdeps/i386/i686/multiarch to sysdeps/i386/multiarch.
> >> That means to make multi-arch available for i486 and i586.
> >> Should I post a patch to do it?
> >
> > I think the principle of having it available there makes sense. However,
> > various files in sysdeps/i386/i686/multiarch include other files from ../
> > (i.e. i686 versions) or ../i486/ or ../i586/. So you'd need to make sure
> > such a change doesn't pessimize things or use unavailable instructions in
> > those fallback versions - the files should include the i686/ versions if
> > __i686__ is defined, etc., making sure to include the best version
> > applicable to the processor for which glibc is compiled (of course i486/
> > versions are always OK to use since i386 isn't supported any more).
>
> I will detect i586/i686 at run-time and select the best one for the hardware.
If, however, glibc is built for i686, then it's best to save on that
conditional and the extra i486 / i586 copy of the code, and just build in
the i686 version (whereas if it's built for i486 or i586, it's best to
have both).
--
Joseph S. Myers
joseph@codesourcery.com