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) {
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;
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");