Subject: --host=${MACHINE_GNU_PLATFORM} forced to i386
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 10/02/2003 18:41:38
MACHINE_GNU_PLATFORM is
${LOWER_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS}${APPEND_ELF}

The LOWER_ARCH may be reduced like:
${UNAME} -m | sed -e 's/i.86/i386/'

I noticed when building glibc that the configure script for glibc detects
the systems real machine type (which in my case is i686).

And if different then it prepares for a cross-build mechanism. (It just
happens that glibc build has know bugs -- but easy patches/workarounds for
this.)

My fix for glibc was to also do:
CONFIGURE_ARGS+=        --build=${MACHINE_GNU_PLATFORM}

So the --build and --host are the same.

With other various packages, I often see messages (from autoconf's
configure) saying:
  WARNING: If you wanted to set the --build type, don't use --host.

Anyways, my question is:

Does anyone else have problems with some software assuming a cross-build?

I should have thought about this before my PR 19789.
http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=19789
Maybe allowing i686 is okay, and get rid of the specific i386 checks (and
use i.86 regex checking instead).

Any comments?

   Jeremy C. Reed
   http://bsd.reedmedia.net/