On Tue, Apr 22, 2014 at 3:38 PM, Steven Vormwald <sdvor...@mtu.edu> wrote: > Hello, > > I'm trying to build clang 3.4 to use libstdc++ from an installation of GCC > 4.8.1, but I haven't been able to get clang to correctly locate the headers. > I've tried configuring both using the '--with-gcc-toolchain' option and the > '--with-cxx-include-root' option, but in both cases the resulting clang > toolchain doesn't find the C++ headers. I suspect this is because GCC was > configured with a non-standard layout > (--with-gxx-include-dir=$PREFIX/include/g++ rather than > $PREFIX/include/c++).
You're right, --with-gcc-toolchain won't work with the non-standard layout you're using. As you show in the clang output, it finds the gcc install, but doesn't find the include dirs. --with-cxx-include-root doesn't exist anymore; it was was replaced by --with-gcc-toolchain in r149651. Patching lib/Driver/ToolChains.cpp like you suggest (Linux::AddClangCXXStdlibIncludeArgs is probably the relevant function) sounds like the way forward. I have no idea if your gcc install layout is common, but if it is you could try contributing a patch. Thanks, Hans _______________________________________________ cfe-users mailing list cfe-users@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users