[cfe-dev] fatal error: 'cstdio' file not found

Alexei Svitkine alexei.svitkine at gmail.com
Sat Jul 17 09:47:56 PDT 2010


That would make the clang binary non-portable to other systems (which
may have different GCC versions).

I'd rather have this detection be done at clang start time. I really
don't think it would have any significant performance penalty (I'm
guessing the code that tries to find header files would need to do a
bunch of file ops anyway to go through the hardcoded list of paths -
so if that hard-coded list was shorter because we'd add the right
thing to it at start time, we'd save doing all that other work later
on).

-Alexei

On Sat, Jul 17, 2010 at 11:23 AM, David Chisnall <theraven at sucs.org> wrote:
> On 17 Jul 2010, at 16:03, Alexei Svitkine wrote:
>
>> Couldn't it be made to detect the right version by looking at what
>> directories exist in /usr/include/c++/ and adding the latest version
>> that's found there?
>
> Perhaps the configure script could grab them from GCC by parsing the output from these two ()
>
> echo | `gcc -print-prog-name=cc1` -v
> echo | `gcc -print-prog-name=cc1plus` -v
>
> Ignore every line before
>
>  #include <...> search starts here:
>
> and after
>
> End of search list.
>
> And you get a list of GCC's search paths (clang -cc1 -v does the same thing, so presumably someone knows about this already...).  If you install a new GCC, you'd just need to rerun the configure script.
>
> David
>
>




More information about the cfe-dev mailing list