llvm-toolchain/debian/patches/21-searchPathHeaders.diff
Sylvestre Ledru ecbcb75034 * New snapshot release
* Update the search path for clang from /usr/include/clang/VERSION/include/
  to /usr/bin/../include/clang/VERSION/include/
  To make sure we avoid mixing the headers from the build and installed on
  the system.
2013-11-07 15:51:53 +00:00

18 lines
849 B
Diff

Index: llvm-toolchain-snapshot_3.4~svn194200/clang/lib/Driver/ToolChains.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn194200.orig/clang/lib/Driver/ToolChains.cpp 2013-11-07 12:39:24.226486698 +0100
+++ llvm-toolchain-snapshot_3.4~svn194200/clang/lib/Driver/ToolChains.cpp 2013-11-07 16:28:42.710987790 +0100
@@ -2531,6 +2531,12 @@
addSystemInclude(DriverArgs, CC1Args, P.str());
}
+ // Under Debian, clang headers are installed into
+ // '/usr/bin/../include/clang/VERSION/include/'
+ // This avoid some mix up at build time with the local and system headers
+ addSystemInclude(DriverArgs, CC1Args, std::string(D.InstalledDir) + "/../include/clang/" + std::string(CLANG_VERSION_STRING) + "/include/");
+
+
if (DriverArgs.hasArg(options::OPT_nostdlibinc))
return;