[cfe-commits] [patch] Add support for different libstdc++ search path with -m32 and -m64

Douglas Gregor dgregor at apple.com
Mon Oct 12 10:20:20 PDT 2009


On Oct 10, 2009, at 7:07 AM, Rafael Espindola wrote:

> The attached patch adds support for having different search paths for
> libstdc++ in -m32 and -m64. The only targets that actually use it so
> far are darwin10 (...i686-apple-darwin10/x86_64
> and  ..i686-apple-darwin10) and ubuntu 64 bits (...x86_64-linux-gnu
> and ...x86_64-linux-gnu/32). All other target should be unaffected.

Looks fine to me.

> It would be very nice if people with other systems could run
>
> gcc -v  -m32 t.cc 2>&1 | sed -n '/^ /p' | sed -n 2,3p
> and
> gcc -v  -m64 t.cc 2>&1 | sed -n '/^ /p' | sed -n 2,3p

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.

	- Doug



More information about the cfe-commits mailing list