llvm-toolchain/debian/patches/28-gcc-4.7-paths.diff
2013-02-26 16:34:08 +00:00

40 lines
1.6 KiB
Diff

Index: llvm-toolchain_3.3~svn176083/clang/lib/Driver/ToolChains.cpp
===================================================================
--- llvm-toolchain_3.3~svn176083.orig/clang/lib/Driver/ToolChains.cpp 2013-02-26 14:10:01.000000000 +0100
+++ llvm-toolchain_3.3~svn176083/clang/lib/Driver/ToolChains.cpp 2013-02-26 14:11:45.000000000 +0100
@@ -33,6 +33,9 @@
// FIXME: This needs to be listed last until we fix the broken include guards
// in these files and the LLVM config.h files.
#include "clang/Config/config.h" // for GCC_INSTALL_PREFIX
+#include "clang/Debian/debian_path.h"
+
+#include <iostream>
#include <cstdlib> // ::getenv
@@ -2634,6 +2637,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",
@@ -2645,10 +2652,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);
+
}
}