[cfe-commits] r84805 - /cfe/trunk/lib/Driver/ToolChains.cpp
Daniel Dunbar
daniel at zuster.org
Wed Oct 21 17:12:00 PDT 2009
Author: ddunbar
Date: Wed Oct 21 19:12:00 2009
New Revision: 84805
URL: http://llvm.org/viewvc/llvm-project?rev=84805&view=rev
Log:
Driver: Fix thinko in logic for finding gcc's tool chain directory.
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=84805&r1=84804&r2=84805&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Oct 21 19:12:00 2009
@@ -65,7 +65,8 @@
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 @@
// 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;
}
More information about the cfe-commits
mailing list