diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-02-25 06:39:53 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-02-25 06:39:53 +0000 |
commit | 3fd345a59db34de5bc8e29a64ebd9f68a1e9eb44 (patch) | |
tree | 8c9b8c60f14d827711460db8efc92734c85d281f /lib/Driver/ToolChains.cpp | |
parent | 2d9f5fa1bcbde31b83c79027c3f1da2d64e3b1fe (diff) |
Add support for ArchLinux, patch by Kevin Winchester.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126476 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 000c713534..d8c374437b 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1271,6 +1271,7 @@ Tool &AuroraUX::SelectTool(const Compilation &C, const JobAction &JA) const { /// Linux toolchain (very bare-bones at the moment). enum LinuxDistro { + ArchLinux, DebianLenny, DebianSqueeze, Exherbo, @@ -1367,6 +1368,9 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) { if (!llvm::sys::fs::exists("/etc/exherbo-release", Exists) && Exists) return Exherbo; + if (!llvm::sys::fs::exists("/etc/arch-release", Exists) && Exists) + return ArchLinux; + return UnknownDistro; } @@ -1436,8 +1440,9 @@ 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", "4.4", - "4.3.4", "4.3.3", "4.3.2", "4.3"}; + 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"}; std::string Base = ""; for (unsigned i = 0; i < sizeof(GccVersions)/sizeof(char*); ++i) { std::string Suffix = GccTriple + "/" + GccVersions[i]; @@ -1498,6 +1503,9 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple) Distro == UbuntuKarmic) ExtraOpts.push_back("--build-id"); + if (Distro == ArchLinux) + Lib = "lib"; + Paths.push_back(Base + Suffix); if (HasMultilib(Arch, Distro)) { if (IsOpenSuse(Distro) && Is32Bits) |