Skip to content

Instantly share code, notes, and snippets.

@lucab
Created July 16, 2013 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucab/6009830 to your computer and use it in GitHub Desktop.
Save lucab/6009830 to your computer and use it in GitHub Desktop.
Index: llvm-3.2.src/clang/lib/Driver/ToolChains.cpp
===================================================================
--- llvm-3.2.src.orig/clang/lib/Driver/ToolChains.cpp 2013-01-18 15:57:25.240901367 +0100
+++ llvm-3.2.src/clang/lib/Driver/ToolChains.cpp 2013-01-18 15:57:49.752900485 +0100
@@ -36,6 +36,9 @@
#include <cstdlib> // ::getenv
#include "clang/Config/config.h" // for GCC_INSTALL_PREFIX
+#include <iostream>
using namespace clang::driver;
using namespace clang::driver::toolchains;
@@ -2379,6 +2382,10 @@
const std::string IncludePathCandidates[] = {
LibDir.str() + "/../include/c++/" + Version.str(),
+ // Once more, Debian headers locations changed (since gcc version 4.7.2-5)
+ // See Debian bug tracker #693240
+ LibDir.str() + "/../include/"+ TripleStr.str() +"/c++/" + Version.str(),
+ LibDir.str() + "/../include/" + DEB_HOST_MULTIARCH_TRIPLET + "/c++/" + Version.str(),
// Gentoo is weird and places its headers inside the GCC install, so if the
// first attempt to find the headers fails, try this pattern.
InstallDir.str() + "/include/g++-v4",
@@ -2390,10 +2397,10 @@
};
for (unsigned i = 0; i < llvm::array_lengthof(IncludePathCandidates); ++i) {
- if (addLibStdCXXIncludePaths(IncludePathCandidates[i], (TripleStr +
+ addLibStdCXXIncludePaths(IncludePathCandidates[i], (TripleStr +
GCCInstallation.getMultiarchSuffix()),
- DriverArgs, CC1Args))
- break;
+ DriverArgs, CC1Args);
+
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment