[cfe-dev] llvm can't use headers from gcc 4.4 on centos Linux x86

Richard Spillane necro351 at gmail.com
Thu Oct 28 10:56:12 PDT 2010


OK, thanks.  Also I forgot to include the AddPaths for the C search,
here is the updated patch.  Also its for CentOS 5.5, not 5.3:

crossroads$ svn diff
Index: lib/Frontend/InitHeaderSearch.cpp
===================================================================
--- lib/Frontend/InitHeaderSearch.cpp   (revision 117545)
+++ lib/Frontend/InitHeaderSearch.cpp   (working copy)
@@ -418,7 +418,13 @@
 void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
                                             const HeaderSearchOptions
&HSOpts) {
   // FIXME: temporary hack: hard-coded paths.
+  // Centos 5.3
+  AddPath("/usr/include/c++/4.4.0", System, true, false, false);
+  AddPath("/usr/include/c++/4.4.0/x86_64-redhat-linux6E", System,
true, false, false);
+  AddPath("/usr/include/c++/4.4.0/backward", System, true, false, false);
   AddPath("/usr/local/include", System, true, false, false);
+  AddPath("/usr/lib/gcc/x86_64-redhat-linux6E/4.4.0/include", System,
true, false, false);
+  AddPath("/usr/local/include", System, true, false, false);

   // Builtin includes use #include_next directives and should be positioned
   // just prior C include dirs.
@@ -645,6 +651,13 @@
     //===------------------------------------------------------------------===//
     // Redhat based distros.
     //===------------------------------------------------------------------===//
+    // Centos 5.3
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.0","", "", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.0/x86_64-redhat-linux6E","",
"", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.0/backward","",
"", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/local/include","", "", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/lib/gcc/x86_64-redhat-linux6E/4.4.0/include","",
"", "", triple);
+
     // Fedora 13
     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.4",
                                 "x86_64-redhat-linux", "32", "", triple);


On Thu, Oct 28, 2010 at 1:46 PM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
> Good midnight Richard,
>
> 2010/10/29 Richard Spillane <necro351 at gmail.com>:
>> However it
>> doesn't pass make check without issuing some "unexpected errors"m.
>> I've attached the failed errors.
>
> It is known issue. (^^;
> http://llvm.org/bugs/show_bug.cgi?id=7995
>
> I will commit this patch within 12 hours, thank you.
>
> ...Takumi
>



-- 
Richard P. Spillane
File Systems and Storage Lab
Stony Brook University
necro351 at gmail.com



More information about the cfe-dev mailing list