------- Comment #33 from paolo dot carlini at oracle dot com 2010-07-25 15:19 ------- (In reply to comment #31) > 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 ?)
This seems like the most reasonable way. Can you try adding -nostdinc++ to PCHFLAGS in libstdc++-v3/include/Makefile.am and attach a patch to this PR if it works for your setup? > 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. And it wouldn't get bugfixes from uninstalled 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. Let's investigate this in more detail if (1) fails to solve the issue. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974