Question about multiarch (not IFUNC) builds

Carlos O'Donell carlos@redhat.com
Wed Dec 3 03:20:00 GMT 2014


On 12/01/2014 06:23 PM, Steve Ellcey  wrote:
> I have a question about building multiarch GCC toolchains and was hoping
> someone could help me understand how toolchains that are currently using
> multiarch setups (like debian) are being built.
> 
> In these setups libraries are put in directories like /lib64/x86_64-linux-gnu
> instead of just /lib64 and I have looked through the glibc configure scripts
> and fragements trying to find out where the install process might decide to
> put libraries in /lib64/x86_64-linux-gnu instead of just /lib64 but I don't
> see anything.

That is because glibc is not multiarch aware.

Debian reorganizes the output of a glibc install
into something it can use.

Then it uses a custom /etc/ld.so.conf.d/* to add in
all of those directories to the standard search path.

> GCC has --enable-multiarch that enables the multiarch functionality and
> changes the search paths for system libraries. In glibc I see
> --enable-multi-arch but that seems to be about IFUNCS and completely
> unrelated to multiarch library paths.  So is there any configure code in glibc
> that causes libraries to be placed in 'lib64/x86_64-linux-gnu' instead of
> just 'lib64' or are people just moving things after the build or do they have
> configure changes that they haven't contributed back to glibc?

The option `--enable-multi-arch` in glibc is about
enabling multiple architectures in the sense of IFUNC
support, but not `multiarch` (one word) in the sense
of gcc or the runtime.

Not to be confused with multilib, either in the sense
of multiple runtimes for gcc, or in the rpm sense of
multiple runtimes e.g. i386 and x86-64.

Cheers,
Carlos.



More information about the Libc-help mailing list