[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About libdir for 64-bit
From: |
Ralf Corsepius |
Subject: |
Re: About libdir for 64-bit |
Date: |
Thu, 18 Jul 2013 06:19:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
On 07/17/2013 10:11 PM, Russ Allbery wrote:
Thomas Jahns <address@hidden> 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
- About libdir for 64-bit, Sergio Belkin, 2013/07/16
- Re: About libdir for 64-bit, Wookey, 2013/07/16
- Re: About libdir for 64-bit, Russ Allbery, 2013/07/16
- Re: About libdir for 64-bit, Ralf Corsepius, 2013/07/16
- Re: About libdir for 64-bit, Thomas Jahns, 2013/07/17
- Re: About libdir for 64-bit, Ralf Corsepius, 2013/07/17
- Re: About libdir for 64-bit, Russ Allbery, 2013/07/17
- Re: About libdir for 64-bit, Thomas Jahns, 2013/07/18
- Re: About libdir for 64-bit, Ralf Corsepius, 2013/07/18
- Re: About libdir for 64-bit, Russ Allbery, 2013/07/18
- Re: About libdir for 64-bit, Earnie Boyd, 2013/07/19
Re: About libdir for 64-bit, Andrew W. Nosenko, 2013/07/17