aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-11-15 09:01:52 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-11-15 09:01:52 +0000
commit5ede807c1194c3a44c0adee83eca24efd626e5bb (patch)
treead79fb637f704331bb81f500c6759a09bcd15d8f /lib/Driver/ToolChains.cpp
parent9c6cd67ea416bace666d614c84d5531124287653 (diff)
Add driver support for Ubuntu 9.10.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r--lib/Driver/ToolChains.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index f1e3e7f85f..10a55979c9 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -1203,6 +1203,7 @@ enum LinuxDistro {
Fedora14,
OpenSuse11_3,
UbuntuJaunty,
+ UbuntuKarmic,
UbuntuLucid,
UbuntuMaverick,
UnknownDistro
@@ -1221,7 +1222,8 @@ static bool IsDebian(enum LinuxDistro Distro) {
}
static bool IsUbuntu(enum LinuxDistro Distro) {
- return Distro == UbuntuLucid || Distro == UbuntuMaverick || Distro == UbuntuJaunty;
+ return Distro == UbuntuLucid || Distro == UbuntuMaverick ||
+ Distro == UbuntuJaunty || Distro == UbuntuKarmic;
}
static bool IsDebianBased(enum LinuxDistro Distro) {
@@ -1254,6 +1256,8 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
return UbuntuLucid;
else if (Lines[i] == "DISTRIB_CODENAME=jaunty")
return UbuntuJaunty;
+ else if (Lines[i] == "DISTRIB_CODENAME=karmic")
+ return UbuntuKarmic;
}
return UnknownDistro;
}
@@ -1342,7 +1346,7 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple& Triple)
GccTriple = "i586-suse-linux";
}
- const char* GccVersions[] = {"4.5.1", "4.5", "4.4.5", "4.4.4", "4.4.3",
+ const char* GccVersions[] = {"4.5.1", "4.5", "4.4.5", "4.4.4", "4.4.3", "4.4",
"4.3.3", "4.3.2"};
std::string Base = "";
for (unsigned i = 0; i < sizeof(GccVersions)/sizeof(char*); ++i) {
@@ -1392,14 +1396,16 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple& Triple)
if (IsFedora(Distro) || Distro == UbuntuMaverick)
ExtraOpts.push_back("--hash-style=gnu");
- if (IsDebian(Distro) || Distro == UbuntuLucid || Distro == UbuntuJaunty)
+ if (IsDebian(Distro) || Distro == UbuntuLucid || Distro == UbuntuJaunty ||
+ Distro == UbuntuKarmic)
ExtraOpts.push_back("--hash-style=both");
if (IsFedora(Distro))
ExtraOpts.push_back("--no-add-needed");
if (Distro == DebianSqueeze || IsOpenSuse(Distro) ||
- IsFedora(Distro) || Distro == UbuntuLucid || Distro == UbuntuMaverick)
+ IsFedora(Distro) || Distro == UbuntuLucid || Distro == UbuntuMaverick ||
+ Distro == UbuntuKarmic)
ExtraOpts.push_back("--build-id");
Paths.push_back(Base + Suffix);