forked from OSchip/llvm-project
Add Redhat Enterprise Linux to the Linux toolchain, PR9769,
patch by Bryce Lelbach llvm-svn: 131840
This commit is contained in:
parent
d60e135cfe
commit
84e38557e0
|
@ -1174,6 +1174,9 @@ enum LinuxDistro {
|
|||
DebianLenny,
|
||||
DebianSqueeze,
|
||||
Exherbo,
|
||||
RHEL4,
|
||||
RHEL5,
|
||||
RHEL6,
|
||||
Fedora13,
|
||||
Fedora14,
|
||||
Fedora15,
|
||||
|
@ -1191,7 +1194,7 @@ enum LinuxDistro {
|
|||
UnknownDistro
|
||||
};
|
||||
|
||||
static bool IsFedora(enum LinuxDistro Distro) {
|
||||
static bool IsRedhat(enum LinuxDistro Distro) {
|
||||
return Distro == Fedora13 || Distro == Fedora14 ||
|
||||
Distro == Fedora15 || Distro == FedoraRawhide;
|
||||
}
|
||||
|
@ -1268,6 +1271,15 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
|
|||
else if (Data.startswith("Fedora release") &&
|
||||
Data.find("Rawhide") != llvm::StringRef::npos)
|
||||
return FedoraRawhide;
|
||||
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") &&
|
||||
Data.find("release 5") != llvm::StringRef::npos)
|
||||
return RHEL5;
|
||||
else if (Data.startswith("Red Hat Enterprise Linux") &&
|
||||
Data.find("release 4") != llvm::StringRef::npos)
|
||||
return RHEL4;
|
||||
return UnknownDistro;
|
||||
}
|
||||
|
||||
|
@ -1439,18 +1451,18 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple)
|
|||
if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb)
|
||||
ExtraOpts.push_back("-X");
|
||||
|
||||
if (IsFedora(Distro) || Distro == UbuntuMaverick || Distro == UbuntuNatty)
|
||||
if (IsRedhat(Distro) || Distro == UbuntuMaverick || Distro == UbuntuNatty)
|
||||
ExtraOpts.push_back("--hash-style=gnu");
|
||||
|
||||
if (IsDebian(Distro) || Distro == UbuntuLucid || Distro == UbuntuJaunty ||
|
||||
Distro == UbuntuKarmic)
|
||||
ExtraOpts.push_back("--hash-style=both");
|
||||
|
||||
if (IsFedora(Distro))
|
||||
if (IsRedhat(Distro))
|
||||
ExtraOpts.push_back("--no-add-needed");
|
||||
|
||||
if (Distro == DebianSqueeze || IsOpenSuse(Distro) ||
|
||||
IsFedora(Distro) || Distro == UbuntuLucid || Distro == UbuntuMaverick ||
|
||||
IsRedhat(Distro) || Distro == UbuntuLucid || Distro == UbuntuMaverick ||
|
||||
Distro == UbuntuKarmic || Distro == UbuntuNatty)
|
||||
ExtraOpts.push_back("--build-id");
|
||||
|
||||
|
|
Loading…
Reference in New Issue