[cfe-commits] [patch] Add support for different libstdc++ search path with -m32 and -m64
Rafael Espindola
espindola at google.com
Wed Oct 14 06:48:57 PDT 2009
> For cases where we have both 32- and 64-bit paths in the search path, like
> this:
>
> // Arch Linux 2008-06-24
> AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.1",
> - "i686-pc-linux-gnu");
> + "i686-pc-linux-gnu",
> + "i686-pc-linux-gnu",
> + triple);
> AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.1",
> - "x86_64-unknown-linux-gnu");
> + "x86_64-unknown-linux-gnu",
> + "x86_64-unknown-linux-gnu",
> + triple);
>
>
> I think it's better to just merge it down to
>
> AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.1",
> "i686-pc-linux-gnu",
> "x86_64-unknown-linux-gnu",
> triple);
>
> and let people complain if we happen to break their platform. More likely,
> we'll fix something they didn't know was broken.
This is probably not the right fix for most systems. For example, I have
a 64 bit ubuntu (/bin/bash is a 64 bit binary). The c++ paths for -m32 bit are
/usr/include/c++/4.2
/usr/include/c++/4.2/x86_64-linux-gnu/32
/usr/include/c++/4.2/backward
and for -m64 they are
/usr/include/c++/4.2
/usr/include/c++/4.2/x86_64-linux-gnu
/usr/include/c++/4.2/backward
I assume that in a 32 bit with -m64 they would look something like
/usr/include/c++/4.2
/usr/include/c++/4.2/i686-linux-gnu
/usr/include/c++/4.2/backward
and
/usr/include/c++/4.2
/usr/include/c++/4.2/i686-linux-gnu/x86_64
/usr/include/c++/4.2/backward
But I don't have a 32 bit system at hand :-)
Is the updated patch (emailed yesterday) OK?
> - Doug
>
Cheers,
--
Rafael Ávila de Espíndola
More information about the cfe-commits
mailing list