diff options
author | Nico Weber <nicolasweber@gmx.de> | 2011-04-25 03:17:35 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2011-04-25 03:17:35 +0000 |
commit | adf8ba98e7608ca2975a01267a9de3e5ed09a9f9 (patch) | |
tree | 1d39f649d21abed1e119c52a479581eb4bbf7997 /clang/lib | |
parent | 5792e02fa1d158b1d7c43e6e0d3bbf19afcf9142 (diff) | |
download | bcm5719-llvm-adf8ba98e7608ca2975a01267a9de3e5ed09a9f9.tar.gz bcm5719-llvm-adf8ba98e7608ca2975a01267a9de3e5ed09a9f9.zip |
Let clang detect gcc triple on Ubuntu Natty. Patch by Thomas Jablin.
llvm-svn: 130119
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index f3c32f7970c..5a893315f5e 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -1297,6 +1297,9 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple) else if (!llvm::sys::fs::exists("/usr/lib/gcc/x86_64-manbo-linux-gnu", Exists) && Exists) GccTriple = "x86_64-manbo-linux-gnu"; + else if (!llvm::sys::fs::exists("/usr/lib/x86_64-linux-gnu/gcc", + Exists) && Exists) + GccTriple = "x86_64-linux-gnu"; } else if (Arch == llvm::Triple::x86) { if (!llvm::sys::fs::exists("/usr/lib/gcc/i686-linux-gnu", Exists) && Exists) GccTriple = "i686-linux-gnu"; @@ -1382,7 +1385,7 @@ 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) + if (IsFedora(Distro) || Distro == UbuntuMaverick || Distro == UbuntuNatty) ExtraOpts.push_back("--hash-style=gnu"); if (IsDebian(Distro) || Distro == UbuntuLucid || Distro == UbuntuJaunty || @@ -1394,7 +1397,7 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple) if (Distro == DebianSqueeze || IsOpenSuse(Distro) || IsFedora(Distro) || Distro == UbuntuLucid || Distro == UbuntuMaverick || - Distro == UbuntuKarmic) + Distro == UbuntuKarmic || Distro == UbuntuNatty) ExtraOpts.push_back("--build-id"); if (Distro == ArchLinux) |