diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-10-22 00:12:00 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-10-22 00:12:00 +0000 |
commit | 080fb19301b1d0ce4149d99b8961e77f7ed4bb2e (patch) | |
tree | ff2831516fb1131f16ef532f4488c148bdd99c04 | |
parent | 139ba86a362593da2e350f881e5c7003917aa5a7 (diff) |
Driver: Fix thinko in logic for finding gcc's tool chain directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84805 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/ToolChains.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 398e5dddbf..ae8119d33d 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -65,7 +65,8 @@ DarwinGCC::DarwinGCC(const HostInfo &Host, const llvm::Triple& Triple, ToolChainDir += llvm::utostr(GCCVersion[2]); // Try the next major version if that tool chain dir is invalid. - if (!llvm::sys::Path(ToolChainDir).exists()) { + std::string Tmp = "/usr/lib/gcc/" + ToolChainDir; + if (!llvm::sys::Path(Tmp).exists()) { std::string Next = "i686-apple-darwin"; Next += llvm::utostr(DarwinVersion[0] + 1); Next += "/"; @@ -78,7 +79,8 @@ DarwinGCC::DarwinGCC(const HostInfo &Host, const llvm::Triple& Triple, // Use that if it exists, otherwise hope the user isn't linking. // // FIXME: Drop dependency on gcc's tool chain. - if (llvm::sys::Path(Next).exists()) + Tmp = "/usr/lib/gcc/" + Next; + if (llvm::sys::Path(Tmp).exists()) ToolChainDir = Next; } |