------- Comment #31 from armand dot potter at free dot fr 2010-07-21 21:35 ------- I made some more investigations (a bit late as I am using now --disable-libpchstdcxx like everyone else). IMHO three main options are possible :
1/ Use -nostdinc++ just as native compilers do. Like said in comment #28, it may break if used cross-compiler is incompatible with in-tree c++ headers (can gcc be built that way ?) 2/ Do not use in-tree headers when using a cross-compiler. Not sure it is a good solution and it may break if cross-compiler does not provide correct c++ headers. 3/ Use -I=\${includedir} just as when doing canadian cross compilations (see comment #17). Note that I am building a native compiler that runs on another host that the one building it (is that also canadian cross compilation no ?) so -I\${includedir} should be included. It is not because this test fails in libstdc++-v3/configure.ac : if test -n "$with_cross_host" && test x"$build_alias" != x"$with_cross_host" && test x"$build" != x"$target"; and this test fails because with-cross-host is not defined in ./configure.ac as host = target (but build != host). Test should be on host (cross_host seems to be deprecated). Also for 3/ to work, '=' needs to be added to -I\${includedir} to force cross-compiler to use sysroot path and to avoid including native headers from build system. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974