Re: About libdir for 64-bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/17/2013 10:11 PM, Russ Allbery wrote:
Thomas Jahns <jahns@xxxxxxx> writes:

I couldn't propose anything. Is there even a method to reliably infer
the ABI from the compiler?

Probing sizeof(long) with the configure compiler does a fairly good job
for the most common cases,
Only on some common Linux distros.

In most other cases, guessing on multilib subdirs from sizeof(long) is not possible.

which is why that's what the macro I posted
does.  In particular, it works for the common cases of -m32 and -m64 on
hosts with both library paths.
Right, but it suffers from the same limitations as Sergei's approach.

If you'd want to have a better guess, you have to apply some magic examining the multilib subdir involving compiler internals, e.g.
gcc --print-multi-os


Fedora x86_64/i386:
# gcc --print-multi-os -m64
../lib64

# gcc --print-multi-os -m32
../lib

RTEMS sparc64 (A 64 bit long) target:
# sparc64-rtems4.11-gcc --print-multi-os
.

RTEMS sparc64 (64 bit w/softfloat):
# sparc64-rtems4.11-gcc --print-multi-os -msoft-float
soft

x86_64-w64-mingw32 -m64 (Windows 64bit):
# x86_64-w64-mingw32-gcc --print-multi-os -m64
../lib

x86_64-w64-mingw32 -m32 (Windows 32bit)
# x86_64-w64-mingw32-gcc --print-multi-os -m32
../lib32


Ralf



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux