[cfe-commits] r129014 - in /cfe/trunk/lib: Driver/ToolChains.cpp Frontend/InitHeaderSearch.cpp
Eric Christopher
echristo at apple.com
Wed Apr 6 11:22:53 PDT 2011
Author: echristo
Date: Wed Apr 6 13:22:53 2011
New Revision: 129014
URL: http://llvm.org/viewvc/llvm-project?rev=129014&view=rev
Log:
Add support for Fedora16, gcc 4.6.0 and Fedora Rawhide.
Patch by Bobby Powers
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=129014&r1=129013&r2=129014&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Apr 6 13:22:53 2011
@@ -1141,6 +1141,8 @@
Exherbo,
Fedora13,
Fedora14,
+ Fedora15,
+ FedoraRawhide,
OpenSuse11_3,
UbuntuHardy,
UbuntuIntrepid,
@@ -1153,7 +1155,8 @@
};
static bool IsFedora(enum LinuxDistro Distro) {
- return Distro == Fedora13 || Distro == Fedora14;
+ return Distro == Fedora13 || Distro == Fedora14 ||
+ Distro == Fedora15 || Distro == FedoraRawhide;
}
static bool IsOpenSuse(enum LinuxDistro Distro) {
@@ -1218,10 +1221,15 @@
if (!llvm::MemoryBuffer::getFile("/etc/redhat-release", File)) {
llvm::StringRef Data = File.get()->getBuffer();
- if (Data.startswith("Fedora release 14 (Laughlin)"))
+ if (Data.startswith("Fedora release 15"))
+ return Fedora15;
+ else if (Data.startswith("Fedora release 14"))
return Fedora14;
- else if (Data.startswith("Fedora release 13 (Goddard)"))
+ else if (Data.startswith("Fedora release 13"))
return Fedora13;
+ else if (Data.startswith("Fedora release") &&
+ Data.find("Rawhide") != llvm::StringRef::npos)
+ return FedoraRawhide;
return UnknownDistro;
}
@@ -1327,10 +1335,11 @@
GccTriple = "powerpc64-unknown-linux-gnu";
}
- const char* GccVersions[] = {"4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4",
- "4.4.3", "4.4", "4.3.4", "4.3.3", "4.3.2",
- "4.3", "4.2.4", "4.2.3", "4.2.2", "4.2.1",
- "4.2"};
+ const char* GccVersions[] = {"4.6.0",
+ "4.5.2", "4.5.1", "4.5",
+ "4.4.5", "4.4.4", "4.4.3", "4.4",
+ "4.3.4", "4.3.3", "4.3.2", "4.3",
+ "4.2.4", "4.2.3", "4.2.2", "4.2.1", "4.2"};
std::string Base = "";
for (unsigned i = 0; i < sizeof(GccVersions)/sizeof(char*); ++i) {
std::string Suffix = GccTriple + "/" + GccVersions[i];
Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=129014&r1=129013&r2=129014&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Wed Apr 6 13:22:53 2011
@@ -681,6 +681,11 @@
//===------------------------------------------------------------------===//
// Redhat based distros.
//===------------------------------------------------------------------===//
+ // Fedora 15
+ AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6.0",
+ "x86_64-redhat-linux", "32", "", triple);
+ AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6.0",
+ "i686-redhat-linux", "", "", triple);
// Fedora 14
AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5.1",
"x86_64-redhat-linux", "32", "", triple);
More information about the cfe-commits
mailing list