[cfe-dev] MinGW header search paths (InitHeaderSearch.cpp)

Douglas Gregor dgregor at apple.com
Fri Apr 22 15:44:34 PDT 2011


On Apr 22, 2011, at 3:43 PM, Tom Prince wrote:

> On 2011-04-22, Ruben Van Boxem wrote:
>> 2011/4/22 Douglas Gregor <dgregor at apple.com>
>> 
>>> 
>>> On Apr 22, 2011, at 12:25 PM, Reid Kleckner wrote:
>>> 
>>>> I didn't interpret his suggestion that way, I thought it was more
>>>> along the lines of doing what the 'which gcc' command does.
>>> 
>>> Ah, my mistake. We could try that for mingw at least. In general, it
>>> doesn't work as well as actually invoking GCC, since every build of GCC
>>> seems to like to put its standard library in a different place.
>>> 
>>> 
>> That was indeed my plan. We can perhaps read the
>> <gcclocation>/../include/c++/ subfolders with random/all versions/targets
>> and add them to the search directories. Once libcxx works with mingw and on
>> windows in general, we can get rid of this foolishness and just add the
>> <clang(++)location>/../include(/c++) and be done with it (for Windows at
>> least).
> 
> 
> On gentoo x86_64, the libstc++ headers are in
> <gcclocation>/../lib64/<triple>/<gcc-version>/include/g++-v4 
> and 
> <gcclocation>/../lib64/<triple>/<gcc-version>/include/g++-v4/<triple>
> so things aren't so simple.

Right. This is actually an extremely hard problem to solve well. Ideally, we'd have ./configure map out the libraries that could be used, and pick a default one that works for the system.

	- Doug



More information about the cfe-dev mailing list