[LLVMdev] Potential breakage in llvm-gcc's ./configure

Joachim Durchholz jo at durchholz.org
Mon Mar 24 11:41:01 PDT 2008

Am Montag, den 24.03.2008, 11:37 -0400 schrieb Daniel Berlin:
> >
> >  ./configure in the llvm package will work on my amd64 machine
> >  with this command line:
> >
> >  ./configure --prefix=$HOME --enable-optimized \
> >  --build=i686-pc-linux-gnu CC=gcc-4.2 CXX=g++-4.2
> >
> >  Note that the CC and CXX flags are set on the command line, not as
> >  environment variables - trying to submit them via the environment got me
> >  all kinds of breakage.
> Err, you should set them as env vars.
> Really.

Hm. For some reason, ld kept searching the wrong (64-bit) library paths
when trying to link the 32-bit results.

I just retried and now everything is fine. Mystifying.
Ah well. Probably my first experiments had some stry env var set that
shouldn't have been, derailing the build machinery.

> >  Also not that this needs to set just --build, not --host (which defaults
> >  to the setting of --build) nor --target (which defaults to whatever
> >  value --host ends up as).
> >
> >
> >  Now the ./configure in llvm-gcc4.2 will choke badly on such a command line.
> >
> >  First, it misinterprets the CC= and CXX= strings as target architecture
> >  names, and continues to complain that it cannot configure for multiple
> >  architectures at once.
> Which is why you should be setting them as env vars :)
> >
> >  Second, it does not default --host or --target to --build.
> This is normal.
> Crappy, but normal.

According to the autoconf docs, this should be everything but normal!
In fact it works for llvm. It's just llvm-gcc that fails to do that
right. (Checked with the config.logs of both runs.)

My best guess is that something is wrong in the .ac file for llvm-gcc,
and the llvm .ac file got it right.


More information about the llvm-dev mailing list