diff options
author | Eric Christopher <echristo@apple.com> | 2011-04-06 18:22:53 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-04-06 18:22:53 +0000 |
commit | 8f1cc075c36212797ef52dac0e2fe35417a6bb6b (patch) | |
tree | 323e9f37aa1e7e558ca91335e9d71aa6b7c315db /lib/Driver/ToolChains.cpp | |
parent | 13eb5657f9847990c01339de5d96e43d36a6305e (diff) |
Add support for Fedora16, gcc 4.6.0 and Fedora Rawhide.
Patch by Bobby Powers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129014 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index f7bace0ed3..f127834f79 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1141,6 +1141,8 @@ enum LinuxDistro { Exherbo, Fedora13, Fedora14, + Fedora15, + FedoraRawhide, OpenSuse11_3, UbuntuHardy, UbuntuIntrepid, @@ -1153,7 +1155,8 @@ enum LinuxDistro { }; 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 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) { 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 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple) 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]; |