[LLVMdev] Linux clang toolchain targets

Larry Gritz lg at larrygritz.com
Thu Mar 10 10:59:13 PST 2011


Is it too late to include "x86_64-unknown-linux" as a supported toolchain name in clang?  We tend to need to hand-patch clang source to find include files properly on our systems, the patch looks something like this (just posting as a guideline, I'm not sure if this is the best approach or not, but it seems to work for us):


Index: lib/Frontend/InitHeaderSearch.cpp
===================================================================
--- lib/Frontend/InitHeaderSearch.cpp   (revision 115972)
+++ lib/Frontend/InitHeaderSearch.cpp   (working copy)
@@ -661,6 +661,19 @@
                                 "x86_64-redhat-linux", "32", "", triple);
     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.2",
                                 "i686-redhat-linux","", "", triple);
+// FIXME
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.2",
+                                "x86_64-unknown-linux", "32", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.3",
+                                "x86_64-unknown-linux", "32", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.4",
+                                "x86_64-unknown-linux", "32", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.5",
+                                "x86_64-unknown-linux", "32", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.6",
+                                "x86_64-unknown-linux", "32", "", triple);
+// END FIXME
+
     // Fedora 11
     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.1",
                                 "x86_64-redhat-linux", "32", "", triple);

--
Larry Gritz
lg at larrygritz.com






More information about the llvm-dev mailing list