[cfe-commits] r118769 - /cfe/trunk/lib/Driver/ToolChains.cpp
Rafael Espindola
rafael.espindola at gmail.com
Wed Nov 10 18:07:14 PST 2010
Author: rafael
Date: Wed Nov 10 20:07:13 2010
New Revision: 118769
URL: http://llvm.org/viewvc/llvm-project?rev=118769&view=rev
Log:
Add support for Exherbo. Patch by Elias Pipping.
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=118769&r1=118768&r2=118769&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Nov 10 20:07:13 2010
@@ -1198,6 +1198,7 @@
enum LinuxDistro {
DebianLenny,
DebianSqueeze,
+ Exherbo,
Fedora13,
Fedora14,
OpenSuse11_3,
@@ -1228,8 +1229,12 @@
}
static bool HasMultilib(llvm::Triple::ArchType Arch, enum LinuxDistro Distro) {
- if (Arch == llvm::Triple::x86_64)
+ if (Arch == llvm::Triple::x86_64) {
+ if (Distro == Exherbo && !llvm::sys::Path("/usr/lib32/libc.so").exists())
+ return false;
+
return true;
+ }
if (Arch == llvm::Triple::x86 && IsDebianBased(Distro))
return true;
return false;
@@ -1284,6 +1289,9 @@
return UnknownDistro;
}
+ if (llvm::sys::Path("/etc/exherbo-release").exists())
+ return Exherbo;
+
return UnknownDistro;
}
@@ -1317,6 +1325,8 @@
} else if (Arch == llvm::Triple::x86_64) {
if (llvm::sys::Path("/usr/lib/gcc/x86_64-linux-gnu").exists())
GccTriple = "x86_64-linux-gnu";
+ else if (llvm::sys::Path("/usr/lib/gcc/x86_64-pc-linux-gnu").exists())
+ GccTriple = "x86_64-pc-linux-gnu";
else if (llvm::sys::Path("/usr/lib/gcc/x86_64-redhat-linux").exists())
GccTriple = "x86_64-redhat-linux";
else if (llvm::sys::Path("/usr/lib64/gcc/x86_64-suse-linux").exists())
More information about the cfe-commits
mailing list