On Fri, 2019-03-15 at 11:27 +0100, Erik Skultety wrote:
> On Thu, Mar 14, 2019 at 05:52:17PM +0000, Daniel P. Berrangé wrote:
> > Although the toolchain binaries for 32-bit x86 are using the ABI
> > i686-linux-gnu, the library install directory is strangely named
> > with the different i386-linux-gnu.
> >
> > Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
> > ---
>
> so the patch looks good to me, so I can give you my:
> Reviewed-by: Erik Skultety <eskultet(a)redhat.com>
Agreed:
Reviewed-by: Andrea Bolognani <abologna(a)redhat.com>
> However, I wasn't able to find anything explaining this to help me understand,
> apart from:
>
https://wiki.debian.org/Multiarch/Tuples
>
> but there's essentially no mention of i686.
Basically if you look at eg.
https://packages.debian.org/sid/amd64/gcc-aarch64-linux-gnu/filelist
https://packages.debian.org/sid/arm64/libvirt0/filelist
you'll see that the name of the cross-compiler contains the ABI
name, and so does the library path:
/usr/bin/aarch64-linux-gnu-gcc
/usr/lib/aarch64-linux-gnu/libvirt.so.0
This is consistent for all Debian architectures *except* i386, where
as seen in
https://packages.debian.org/sid/amd64/gcc-i686-linux-gnu/filelist
https://packages.debian.org/sid/i386/libvirt0/filelist
the name of the cross-compiler still contains the ABI name, but
the library path uses a slightly different triplet instead:
/usr/bin/i686-linux-gnu-gcc
/usr/lib/i386-linux-gnu/libvirt.so.0
This is the reason why we need to special-case this architecture
when generating a cross-compilation environment.
Thinking some more, I expect what happened is that the Debian 32-bit x86
arch did indeed generate code compatible with i386 and thus this library
path got set. These days no one cares about true i386 compat, so the
compiler toolchain is built to generate i686 compatible instructions,
hence the compiler got the different name, but the library directory
path remainined for back compat.
Regards,
Daniel
--
|: