aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2012-09-18 22:25:07 +0000
committerHal Finkel <hfinkel@anl.gov>2012-09-18 22:25:07 +0000
commit02014b485394cc93e0a2bd386e94424a5707ea69 (patch)
tree3a83d08cc7ec6750a02e2beec938f4d548ef1c67 /lib/Driver/ToolChains.cpp
parent7de32964026e4c5ff32cbca484ffb24e73393d87 (diff)
Add C/C++ header locations for the Freescale SDK.
The Freescale SDK is based on OpenEmbedded, and this might be useful for other OpenEmbedded-based configurations as well. With minor modifications, patch by Tobias von Koch! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r--lib/Driver/ToolChains.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 0fd5202840..2517b3093f 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -1291,6 +1291,10 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(
"/gcc/" + CandidateTriple.str(),
"/" + CandidateTriple.str() + "/gcc/" + CandidateTriple.str(),
+ // The Freescale PPC SDK has the gcc libraries in
+ // <sysroot>/usr/lib/<triple>/x.y.z so have a look there as well.
+ "/" + CandidateTriple.str(),
+
// Ubuntu has a strange mis-matched pair of triples that this happens to
// match.
// FIXME: It may be worthwhile to generalize this and look for a second
@@ -1300,6 +1304,7 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(
const std::string InstallSuffixes[] = {
"/../../..",
"/../../../..",
+ "/../..",
"/../../../.."
};
// Only look at the final, weird Ubuntu suffix for i386-linux-gnu.
@@ -2374,6 +2379,9 @@ void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
InstallDir.str() + "/include/g++-v4",
// Android standalone toolchain has C++ headers in yet another place.
LibDir.str() + "/../" + TripleStr.str() + "/include/c++/" + Version.str(),
+ // Freescale SDK C++ headers are directly in <sysroot>/usr/include/c++,
+ // without a subdirectory corresponding to the gcc version.
+ LibDir.str() + "/../include/c++",
};
for (unsigned i = 0; i < llvm::array_lengthof(IncludePathCandidates); ++i) {