+ bool Linux::HasNativeLLVMSupport() const {
+--- llvm-3.5.0.src/tools/clang/lib/Driver/Tools.cpp.orig 2014-08-07 06:51:51.000000000 +0200
++++ llvm-3.5.0.src/tools/clang/lib/Driver/Tools.cpp 2014-10-01 21:04:32.002828710 +0200
+@@ -26,6 +26,7 @@
+ #include "llvm/ADT/StringExtras.h"
+ #include "llvm/ADT/StringSwitch.h"
+ #include "llvm/ADT/Twine.h"
++#include "llvm/Config/config.h"
+ #include "llvm/Option/Arg.h"
+ #include "llvm/Option/ArgList.h"
+ #include "llvm/Option/Option.h"
+@@ -1425,7 +1426,7 @@
+ // as gold requires -plugin to come before any -plugin-opt that -Wl might
+ // forward.
+ CmdArgs.push_back("-plugin");
+- std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so";
++ std::string Plugin = LLVM_LIBDIR "/LLVMgold.so";
+ CmdArgs.push_back(Args.MakeArgString(Plugin));
+
+ // Try to pass driver level flags relevant to LTO code generation down to
+@@ -2037,12 +2038,7 @@
+
+ static SmallString<128> getCompilerRTLibDir(const ToolChain &TC) {
+ // The runtimes are located in the OS-specific resource directory.
+- SmallString<128> Res(TC.getDriver().ResourceDir);
+- const llvm::Triple &Triple = TC.getTriple();
+- // TC.getOS() yield "freebsd10.0" whereas "freebsd" is expected.
+- StringRef OSLibName = (Triple.getOS() == llvm::Triple::FreeBSD) ?
+- "freebsd" : TC.getOS();
+- llvm::sys::path::append(Res, "lib", OSLibName);
++ SmallString<128> Res(LLVM_LIBDIR);
+ return Res;