[cfe-dev] Version agnostic path search for mingw
csdavec at swan.ac.uk
Mon Mar 19 09:40:14 CDT 2012
On 19 Mar 2012, at 13:44, Aaron Ballman wrote:
> 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?
It would be nice to have something generic where we can specify a pattern. This would be useful for all platforms using GNUy headers / libs, including Linux and Solaris. There's already some GCC search logic that Chandler wrote, but it's quite Linux-specific.
The gcc paths I've seen have, some, none, or all of:
- some fixed components (e.g. /opt/gnu, /usr/gcc, /usr/local)
- GCC major and minor (e.g. 4.5) components
- GCC major, minor, and subminor (e.g. 4.5.1) components
- The full triple (e.g. i686-linux-gnu)
- The base triple and a suffix (e.g i386-pc-solaris11/amd64)
I would love to see an API where I can provide each of these path components including placeholders for GCC versions and the triple, and have it return the best match. In a perfect world, it should also respect --sysroot.
More information about the cfe-dev