[cfe-commits] [patch] Add support for different libstdc++ search path with -m32 and -m64
Rafael Espindola
espindola at google.com
Tue Oct 13 12:51:00 PDT 2009
> Sure thing.
> openSUSE 11.1, 64bit:
> # gcc -v -m32 t.cc 2>&1 | sed -n '/^ /p' | sed -n 2,3p
> /usr/include/c++/4.3
> /usr/include/c++/4.3/x86_64-suse-linux/32
> gcc -v -m64 t.cc 2>&1 | sed -n '/^ /p' | sed -n 2,3p
> /usr/include/c++/4.3
> /usr/include/c++/4.3/x86_64-suse-linux
> Please note that the "32" in the path for -m32 is a symlink to the
> directory it is in and thus superfluous, so removing it would yield the
> paths we have now.
Thanks. I added it to the patch anyway. Making it similar to gcc makes
it easier to
(for example) compare preprocessed output.
> I have to admit that I don't understand why you need one entry for
> openSUSE 11.2 32bit and one for 64bit. Doesn't the new
> AddGnuCPlusPlusIncludePaths have the parameters to merge these two
> entries? Same applies to the openSUSE 11.1 entries. Or is this all about
> the compiler target arch instead of the OS arch? Then it would make sense.
It is about the -m32/-m64 options :-)
I assume that 32 and 64 bit openSUSE means that binaries are 32 or 64 bits
(run file /bin/bash). In both cases gcc should be able to produce 32 and 64 bit
binaries, and have different search paths.
>From what is in InitHeaderSearch.cpp I assume that a 32 bit openSUSE 11.2
searches in
/usr/include/c++/4.4/i586-suse-linux for 32 bit
and
/usr/include/c++/4.4/i586-suse-linux/something for 64 bit
What I will work next is on making this available at compile time via
configure :-)
> Regards,
> Carl-Daniel
>
> --
> Developer quote of the week:
> "We are juggling too many chainsaws and flaming arrows and tigers."
>
>
Cheers,
--
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libstdcxx.patch
Type: text/x-diff
Size: 8286 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20091013/98ecfd0d/attachment.patch>
More information about the cfe-commits
mailing list