[LLVMdev] Just got bitten by accidentally using the wrong gcc

Joachim Durchholz jo at durchholz.org
Thu Mar 20 16:08:51 PDT 2008

Am Donnerstag, den 20.03.2008, 15:44 -0700 schrieb Tanya M. Lattner:
> Its not just a matter of checking major/minor versions. It also depends on 
> the target and in some cases the OS.
> http://llvm.org/docs/GettingStarted.html#brokengcc
> So for example, GCC 3.3.3 on Suse or GCC 3.4.0 on linux/x86 
> (32-bit) has issues. Is it easy to check these kinds of things?

uname identifies arch.

/etc/lsb-release identifies Linux distribution; I'm not sure how to
identify Apple and Cygwin.

$prog --version gives a version string for all $progs that follow GNU
conventions (most do).

> Do we even want to?

Dunno, that's why I'm asking.

The one thing that counts for doing it is that ./configure is exactly
for dealing with all those little annoyances that different OSes, tool
versions etc. bring.

The thing that counts against them is that keeping the list of
broken-for-llvm tool versions is a neverending task - but then that's
normal for what ./configure does, so does this really count?

> I guess it could be done for things like 4.1.1 or a couple of others on 
> the list.

For those cases where the script cannot fully determine the conditions,
it might be helpful to emit just a warning. Describe what the issue is,
how any problems would manifest, and let the user go ahead in such a

Just my 2c.


More information about the llvm-dev mailing list