with_cross_host vs cross-hosted
Daniel Jacobowitz
dmj+@andrew.cmu.edu
Thu Jul 5 13:15:00 GMT 2001
On Thu, Jul 05, 2001 at 02:55:48PM -0400, DJ Delorie wrote:
>
> My linux-cygwin-cygwin builds have been failing, and I finally took
> the time to track it down. In libstdc++-v3, configure uses
> ${with_cross_host} to choose whether we run a program to generate
> std_limits.h, or use default values. Nobody ever sets
> ${with_cross_host}. I modified configure to explicitly test the
> build, host, and target values. Has anyone had any success
> cross-building a native?
No. I posted about this a couple of weeks ago. Your patch is wrong;
once we're building libstdc++, $host is what is normally considered
$target, and $target is undefined. --with-cross-host is actually
passed by the toplevel configure if $host != $target, to preserve the
missing piece of information.
> ! if test -n "$with_cross_host"; then
> ! if test "$build $build" != "$host $target"; then
How about 'if test x"$build" != x"$host"' ? We don't really care what
the compiler's host will be, just what the library's host/target will
be. If you're compiling x86-linux -> sparc-solaris -> x86-linux, I
don't see anything wrong with running the tests natively.
> ***************
> *** 83,87 ****
> # If Canadian cross, then don't pick up tools from the build
> # directory.
> ! if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
> CANADIAN=yes
> NULL_TARGET=yes
> --- 85,89 ----
> # If Canadian cross, then don't pick up tools from the build
> # directory.
> ! if test x"$build" != x"$host" && x"$build" != x"$target"; then
> CANADIAN=yes
> NULL_TARGET=yes
>
You hit the missing "test" there too :) Plus, as I mentioned, $target
can't be trusted at this point.
Does 'if test x"$build" != x"$with_cross_host" && test x"$build" !=
x"$host"' work for you? That's presumably the right test for a true
Canadian cross.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
More information about the Gcc-bugs
mailing list