mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-07-26 05:13:07 +00:00
Fix the path detection just like in clang 3.2 1~exp5
This commit is contained in:
parent
acf5d74a48
commit
fc9d08477f
33
debian/patches/28-gcc-4.7-paths.diff
vendored
33
debian/patches/28-gcc-4.7-paths.diff
vendored
@ -1,30 +1,25 @@
|
|||||||
Index: llvm-3.2.src/clang/lib/Driver/ToolChains.cpp
|
Index: clang-3.2/tools/clang/lib/Driver/ToolChains.cpp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- llvm-3.2.src.orig/clang/lib/Driver/ToolChains.cpp 2013-01-12 15:33:39.427064577 +0100
|
--- clang-3.2~rc1.orig/tools/clang/lib/Driver/ToolChains.cpp 2012-11-27 12:21:42.000000000 +0100
|
||||||
+++ llvm-3.2.src/clang/lib/Driver/ToolChains.cpp 2013-01-12 15:34:27.855063496 +0100
|
+++ clang-3.2~rc1/tools/clang/lib/Driver/ToolChains.cpp 2012-11-29 09:47:06.000000000 +0100
|
||||||
@@ -2124,7 +2124,7 @@
|
@@ -36,6 +36,9 @@
|
||||||
const llvm::Triple &GCCTriple = GCCInstallation.getTriple();
|
#include <cstdlib> // ::getenv
|
||||||
const std::string &LibPath = GCCInstallation.getParentLibPath();
|
|
||||||
|
#include "clang/Config/config.h" // for GCC_INSTALL_PREFIX
|
||||||
|
+#include "clang/Debian/debian_path.h"
|
||||||
|
+
|
||||||
|
+#include <iostream>
|
||||||
|
|
||||||
- if (IsAndroid && isMipsR2Arch(Triple.getArch(), Args))
|
using namespace clang::driver;
|
||||||
+ if (IsAndroid && isMipsR2Arch(Triple.getArch(), Args))
|
using namespace clang::driver::toolchains;
|
||||||
addPathIfExists(GCCInstallation.getInstallPath() +
|
@@ -2316,6 +2318,10 @@
|
||||||
GCCInstallation.getMultiarchSuffix() +
|
|
||||||
"/mips-r2",
|
|
||||||
@@ -2376,9 +2376,16 @@
|
|
||||||
StringRef InstallDir = GCCInstallation.getInstallPath();
|
|
||||||
StringRef Version = GCCInstallation.getVersion().Text;
|
|
||||||
StringRef TripleStr = GCCInstallation.getTriple().str();
|
|
||||||
+ llvm::Triple MultiarchTriple
|
|
||||||
+ = GCCInstallation.getTriple().isArch32Bit() ? GCCInstallation.getTriple().get64BitArchVariant()
|
|
||||||
+ : GCCInstallation.getTriple().get32BitArchVariant();
|
|
||||||
|
|
||||||
const std::string IncludePathCandidates[] = {
|
const std::string IncludePathCandidates[] = {
|
||||||
LibDir.str() + "/../include/c++/" + Version.str(),
|
LibDir.str() + "/../include/c++/" + Version.str(),
|
||||||
+ // Once more, Debian headers locations changed (since gcc version 4.7.2-5)
|
+ // Once more, Debian headers locations changed (since gcc version 4.7.2-5)
|
||||||
+ // See Debian bug tracker #693240
|
+ // See Debian bug tracker #693240
|
||||||
+ LibDir.str() + "/../include/"+ TripleStr.str() +"/c++/" + Version.str(),
|
+ LibDir.str() + "/../include/"+ TripleStr.str() +"/c++/" + Version.str(),
|
||||||
+ LibDir.str() + "/../include/"+ MultiarchTriple.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
|
// Gentoo is weird and places its headers inside the GCC install, so if the
|
||||||
// first attempt to find the headers fails, try this pattern.
|
// first attempt to find the headers fails, try this pattern.
|
||||||
InstallDir.str() + "/include/g++-v4",
|
InstallDir.str() + "/include/g++-v4",
|
||||||
|
Loading…
Reference in New Issue
Block a user