libstdc++.6.dylib only 64-bit even though "--with-multilib=all"

Philip Herron
Thu Sep 16 23:43:00 GMT 2010

On 17 September 2010 00:38, Philip Herron <> wrote:
> On 16 September 2010 19:14,  <> wrote:
>> Hi folks,
>> I have  built the gcc version 4.5.1 on my MacBook Air running MacOS X Snow Leopard (to create a native gcc).
>> I used the following configure options:  ../gcc-4.5.1-src/configure --prefix=/usr --with-multilib=all --program-suffix=-4.5.1
>> Because of the parameter --with-multilib=all, I expected that the resulting gcc toolchain will allow me to make both 32 and 64 bit software.
>> For that I also expected the standard libraries to be muli-format (mulitlib?).
>> But libstdc++.6 is only in 64 bit format:
>> bash-3.2$ file /usr/lib/libstdc++.6.dylib
>> /usr/lib/libstdc++.6.dylib: Mach-O 64-bit dynamically linked shared library x86_64
>> There is another library, this one is multi-format. I don't know if this got created by compiling the gcc or if I had that one before builing gcc:
>> bash-3.2$ file /usr/lib/libstdc++.6.0.9.dylib
>> /usr/lib/libstdc++.6.0.9.dylib: Mach-O universal binary with 3 architectures
>> /usr/lib/libstdc++.6.0.9.dylib (for architecture i386): Mach-O dynamically linked shared library i386
>> /usr/lib/libstdc++.6.0.9.dylib (for architecture ppc7400):      Mach-O dynamically linked shared library ppc
>> /usr/lib/libstdc++.6.0.9.dylib (for architecture x86_64):       Mach-O 64-bit dynamically linked shared library x86_64
>> The problem is that when I start some programms, for example eclipse or firefox, it links to the libstdc++.6.dylib library but needs the 32-bit code.
>> How can I tell the gcc to create the standard libraries with both i386 and x86_64 format (don't really need ppc)?
> Can you not compile and install twice with two different --prefix=
> options so they are installed to two different locations? And is it
> truly necessary to have compilers and libraries for both architectures
> why not simply run whatever your cpu is?
> --Phil

Check out,,, about cross
compilation since in essence your really making 2 compilers targeted
for 1 platform you host which both require different libraries for
their target code to link of.


More information about the Gcc-help mailing list