On Tue, May 18, 2004 at 12:41:58PM -0700, Daniel Kegel wrote: > Background: > Currently, autoconf sets cross_compiling=no if host_alias = build_alias. > That's not always correct -- if you want to build from pristine sources, > the best way is to pretend it's a cross-build. (LFS comes to mind.) > The usual workaround is to use a slightly phony value for host_alias > by modifying the more-or-less unused manufacturer field (e.g. > i686-HOST-linux-gnu). > This fails for architectures which only have a single manufacturer, > as config.sub will reject phony manufacturer names. > It's also clumsy when doing a canadian cross, as all those phony machine > names get confusing. > > My current problem: > I'm doing a canadian cross build of a gcc/glibc toolchain. > gcc is configured with > --build=i686-pc-linux-gnu --target=x86_64-unknown-linux-gnu > --host=x86_64-unknown-linux-gnu > and glibc is configured with the machine types shifted by one as usual > (see the famous comment in > http://gcc.gnu.org/ml/libstdc++/2003-07/msg00461.html, > and another example at > http://handhelds.org/download/toolchain/gcc-build-cross-3.3): > --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu > Configuring glibc-2.3.2 fails with the error > checking size of long double... configure: error: cannot compute sizeof > (long double), 77 > because autoconf-2.57 mistakenly thinks that because build=host, it > can run the output of the C compiler. But this is incorrect. You don't shift by one; you shift target into host, but build should stay the same. How can you expect configure to work right if you lie to it about the build host? -- Daniel Jacobowitz