GMP & MPFR think I'm cross compiling!

Matthew Burgess matthew at
Mon Nov 24 11:29:52 PST 2008

On Mon, 24 Nov 2008 00:35:16 +0100, "Gilles Espinasse" <g.esp at> wrote:

> Just look in configure.log, you will see at wich line of configure the
> test
> is made.
> configure:1654: checking build system type
> configure:1672: result: athlon-pc-linux-gnu
> configure:1680: checking host system type
> configure:1694: result: athlon-pc-linux-gnu


configure:1694: result: none-pc-linux-gnu

That string is stored in $ac_cv_host_alias, which is in turn the result of running `$ac_config_sub $ac_cv_host_alias` (line 1688).

$ac_cv_host_alias in turn is set from $host_alias (line 1685).  But now, I can't tell what's setting $host_alias.  Everything points toward it being a command-line option, but I'm building by the book...ah, now I see it, it's being passed on the command line to that invocation of configure:

  $ /home/matthew/sources/gcc-4.3.2/gmp/configure --cache-file=./config.cache --disable-nls --disable-shared --disable-libssp --enable-languages=c --program-transform-name=s,y,y, --build=i686-pc-linux-gnu --host=none-pc-linux-gnu --target=none-pc-linux-gnu --srcdir=../../gcc-4.3.2/gmp --disable-intermodule --enable-checking=yes,types --disable-coverage --enable-languages=c --disable-shared

That also probably explains why the chapter 6 builds of GMP & MPFR configure correctly, as they're configured by hand, not by some Makefile hocus pocus.

I think the following top-level Makefile snippet is the culprit (from the maybe-configure-gmp target):

	$(SHELL) $${libsrcdir}/configure \
	  $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
	  --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared \

See how it hardcodes --target=none-...?  That would suggest that everyone, regardless of build environment should be seeing this, right?  Confirmation would be very much appreciated.



More information about the lfs-dev mailing list