diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-03-14 15:39:50 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-03-14 15:39:50 +0000 |
commit | 814638ed5a7bb7fc9df96d9be2c9a5d2a0d96b02 (patch) | |
tree | e64a33060d20846d2d14651ef3b364acad270bd2 /lib/Driver/ToolChains.cpp | |
parent | 5370383567e32c840b728bd5d066db281710f2c1 (diff) |
Support Ubuntu hardy and intrepid, from Thomas Gamper!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127583 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 7cae9ba027..dc35a33598 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1280,6 +1280,8 @@ enum LinuxDistro { Fedora13, Fedora14, OpenSuse11_3, + UbuntuHardy, + UbuntuIntrepid, UbuntuJaunty, UbuntuKarmic, UbuntuLucid, @@ -1300,7 +1302,8 @@ static bool IsDebian(enum LinuxDistro Distro) { } static bool IsUbuntu(enum LinuxDistro Distro) { - return Distro == UbuntuLucid || Distro == UbuntuMaverick || + return Distro == UbuntuHardy || Distro == UbuntuIntrepid || + Distro == UbuntuLucid || Distro == UbuntuMaverick || Distro == UbuntuJaunty || Distro == UbuntuKarmic; } @@ -1329,6 +1332,10 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) { llvm::SmallVector<llvm::StringRef, 8> Lines; Data.split(Lines, "\n"); for (unsigned int i = 0, s = Lines.size(); i < s; ++ i) { + if (Lines[i] == "DISTRIB_CODENAME=hardy") + return UbuntuHardy; + if (Lines[i] == "DISTRIB_CODENAME=intrepid") + return UbuntuIntrepid; if (Lines[i] == "DISTRIB_CODENAME=maverick") return UbuntuMaverick; else if (Lines[i] == "DISTRIB_CODENAME=lucid") @@ -1444,7 +1451,8 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple) 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.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]; |