diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-06-03 15:23:24 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-06-03 15:23:24 +0000 |
commit | 5a640efa55631cc38fe36bdd0ab8283b28322503 (patch) | |
tree | 1e3e01257ae3c29b8bef33be61d7fd6e6fbd0314 /lib/Driver/ToolChains.cpp | |
parent | a18f539628a6506bae6af52eacd541cebefff762 (diff) |
Add support for centos.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 9452c1fb34..87703ddffc 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1201,7 +1201,8 @@ enum LinuxDistro { static bool IsRedhat(enum LinuxDistro Distro) { return Distro == Fedora13 || Distro == Fedora14 || - Distro == Fedora15 || Distro == FedoraRawhide; + Distro == Fedora15 || Distro == FedoraRawhide || + Distro == RHEL4 || Distro == RHEL5 || Distro == RHEL6; } static bool IsOpenSuse(enum LinuxDistro Distro) { @@ -1281,10 +1282,12 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) { else if (Data.startswith("Red Hat Enterprise Linux") && Data.find("release 6") != llvm::StringRef::npos) return RHEL6; - else if (Data.startswith("Red Hat Enterprise Linux") && + else if ((Data.startswith("Red Hat Enterprise Linux") || + Data.startswith("CentOS")) && Data.find("release 5") != llvm::StringRef::npos) return RHEL5; - else if (Data.startswith("Red Hat Enterprise Linux") && + else if ((Data.startswith("Red Hat Enterprise Linux") || + Data.startswith("CentOS")) && Data.find("release 4") != llvm::StringRef::npos) return RHEL4; return UnknownDistro; @@ -1500,7 +1503,9 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple) ExtraOpts.push_back("--no-add-needed"); if (Distro == DebianSqueeze || Distro == DebianWheezy || - IsOpenSuse(Distro) || IsRedhat(Distro) || Distro == UbuntuLucid || + IsOpenSuse(Distro) || + (IsRedhat(Distro) && Distro != RHEL4 && Distro != RHEL5) || + Distro == UbuntuLucid || Distro == UbuntuMaverick || Distro == UbuntuKarmic || Distro == UbuntuNatty) ExtraOpts.push_back("--build-id"); |