summaryrefslogtreecommitdiff
blob: e1beff3f1615c875430e6bc1f6a19b387100be57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Bug #387309

--- llvm/tools/clang/lib/Driver/ToolChains.cpp.orig	2011-11-09 23:10:04.000000000 +0100
+++ llvm/tools/clang/lib/Driver/ToolChains.cpp	2011-11-09 23:11:04.000000000 +0100
@@ -1586,12 +1586,13 @@
     // This is of the form /foo/bar/include/c++/4.5.2/
     if (CxxIncludeRoot.back() == '/')
       llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the /
+    llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the g++-v4
+    llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the include
     StringRef Version = llvm::sys::path::filename(CxxIncludeRoot);
     llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the version
-    llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the c++
-    llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the include
+    llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the ARCH
     GccInstallPath = CxxIncludeRoot.str();
-    GccInstallPath.append("/lib/gcc/");
+    GccInstallPath.append("/");
     GccInstallPath.append(CXX_INCLUDE_ARCH);
     GccInstallPath.append("/");
     GccInstallPath.append(Version);