autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting a list of available C compilers


From: Harlan Stenn
Subject: Re: Getting a list of available C compilers
Date: Sun, 01 Nov 2009 00:09:36 +0000

Hi Ralf,
> 
> * Harlan Stenn wrote on Tue, Oct 27, 2009 at 12:39:24AM CET:
> > Does anybody have (a pointer to) a small utility that will return a list
> > of available C compilers on a system?
> 
> I guess you can peek at AC_PROG_CC for a list, that is of course far
> from complete.
> 
> > Extra points if it can ferret out multiple instances/versions of gcc...
> 
> Question is why would you need it and what would you do with it?
> What does it help you to know about a bunch of $host-gcc-X.Y if
> you are not going to compile for $host?

I'm working on some automated build testing for NTP.

For many "traditional" OSes, there will be a native cc and perhaps gcc.

For some machines, cc is present but is really gcc.

On other machines there are multiple versions of gcc installed.

We are interested in seeing any warnings/problems that may happen when
building with all of these, and it can be "too much work" to expect
somebody to enumerate the various C compilers on each platform.

If I have a script that will generate the list of unique (more or less,
I expect this will be a bit of a moving target) C compilers, I can:

 for i in `cc-list`
 do
     build CC=$i
 done

and our "build" script will produce (for example):

 A.`config.guess`-$cc/

in which a build is done using that C compiler.

First, I use my cvo script instead of config.guess as I need
CPU-Vendor-OS information, especially for the 'linux' machines.

Second, there are frequently several more "identifiers" that are in the
A.* name, as we generally build at least 4 different configurations for
each platform, and we'd build all those configurations using each
available C compiler.

H




reply via email to

[Prev in Thread] Current Thread [Next in Thread]