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

Joachim Durchholz jo at durchholz.org
Sat Mar 22 01:17:04 PDT 2008

Let me give a shorter version of my previous mail:

Am Freitag, den 21.03.2008, 19:48 +0100 schrieb Joachim Durchholz:
> Am Freitag, den 21.03.2008, 06:56 -0700 schrieb Shantonu Sen:
> > I recommend you don't parse version strings.

I think you mean one shouldn't parse output intended for humans, and I
agree that one should avoid this if possible.

In the case of gcc, the -dumpversion option emits an easily parsable,
bare version string.
For binutils (including ld), this is far more difficult because (a)
there is no bare version number available, and (b) llvm does not assume
GNU tools. Probably it's best to match the output of
  ld -v
  *GNU ld*2.16*
  *GNU ld*2.17*
to catch the two versions that are known to cause problems.

> > If there are  
> > test cases that you'd like to embed directly into the configure script  
> > that will crash the compiler, that's probably worth doing up front.

That might be useful, but this is not what I'm after.
I'd like to see ./configure check the requirements listed in sections
"Software" and "Broken versions of GCC and other tools" on page
file:///home/jo/Desktop/Delta/llvm/docs/GettingStarted.html .

If a version cannot be identified, it's enough to issue a warning.
If downgrading an optimizer option is enough, then this should be made
the default (and issuing a warning would be OK so performance-conscious
people will know they should upgrade).


More information about the llvm-dev mailing list