[cfe-dev] Version agnostic path search for mingw

Aaron Ballman aaron at aaronballman.com
Mon Mar 19 07:09:56 PDT 2012


On Mon, Mar 19, 2012 at 9:01 AM, Nikola Smiljanic <popizdeh at gmail.com> wrote:
>> This will only work for single digit versions.  Might want to modify
>> the regex to handle multi-digit releases?
>
> I haven't seen those. Does such release even exist?

http://gcc.gnu.org/releases.html

2.95, 2.95.1, etc

So not that often, but not unheard of.

>> Also, are there ever releases with only a major and minor version?
>
> They use 0 as the last digit in this case. 4.5.0 is an example.

Not always, 3.1, 3.2, 3.3, etc.

In both cases, I'm skeptical that we'll run into a problem with your
code; just figure that it won't hurt either.

>> Also, I wonder if we can continue the generalization of the functions
>> so they can be used by any of the triples which have version numbers
>> in their paths?
>
> Ugh, I don't think so, the functions we have right now are so specific
> and build paths in very different ways. But if you have an idea I'll
> gladly try it out.
>
> I think this whole business with header search is far from perfect,
> you can't possibly detect mingw. We'll have to live with assumptions.
> I'm guessing that this should be solved with some kind of config file
> but this is something the universal driver should do right?

I may not have been clear enough (sorry!).  I noticed in
InitHeaderSearch, there are other triples which use version numbers in
the paths (Minix, Solaris, Darwin, etc) and so I'm wondering if it
might make sense to generalize your regex solution to cover those
cases as well.  It may make sense, it may not.

~Aaron




More information about the cfe-dev mailing list