x86_64 gcc multilibs

Jakub Jelinek jakub at redhat.com
Mon Feb 7 11:26:22 UTC 2005

On Mon, Feb 07, 2005 at 12:10:37PM +0100, Ralf Corsepius wrote:
> Hi,
> Is it correct, that FC3's gcc on x86_64 uses these multilibs:
> $ x86_64-redhat-linux-gcc  -print-multi-lib
> .;
> 32;@m32
> IMO, this is wrong and should either be 
> (assuming . matching -m64 | lib64)
> .;
> 32;../lib
> or (assuming . matching -m32 | lib)
> .;
> 64;../lib64
> If x86_64 gcc was using one of the latter muliblib-sets,
>  gcc -m64 -L/xxx/lib
> would automatically pickup m64 compiled libs from /xxx/lib/../lib64,
> instead of those from /xxx/lib.
> Unfortunately I don't have access to x86_64 systems :-(

Nope, it is correct.  -print-multi-lib is about what multilib combinations
exists and the relative path they are using inside of /usr/lib/gcc/*/*/
etc.  -print-multi-os-directory is what tells you the relative path
used to search multilib directories that are under OS rather than GCC's
For gcc that defaults to -m64 you get:
gcc -print-multi-os-directory -m32; gcc -print-multi-os-directory -m64; gcc -print-multi-os-directory


More information about the fedora-devel-list mailing list