This patch to gotools/configure.ac fixes the build to build the tools
when host_alias = target_alias, or, in other words, when the system
for which we are building code is the same as the system where that
code will run.  The earlier test of cross_compiling effectively tested
whether build_alias and host_alias were different, which is not the
same thing when doing a Canadian Cross.  This is for PR 80964.
Bootstrapped on x86_64-pc-linux-gnu (there are no tests for this code,
which is unfortunate).  Committed to mainline.

Ian

2017-06-13  Ian Lance Taylor  <i...@golang.org>

PR go/80964
* configure.ac: Set NATIVE if host_alias = target_alias.
* configure: Rebuild.
Index: configure.ac
===================================================================
--- configure.ac        (revision 249171)
+++ configure.ac        (working copy)
@@ -46,7 +46,7 @@ AC_PROG_INSTALL
 AC_PROG_CC
 AC_PROG_GO
 
-AM_CONDITIONAL(NATIVE, test "$cross_compiling" = no)
+AM_CONDITIONAL(NATIVE, test "$host_alias" = "$target_alias")
 
 dnl Test for -lsocket and -lnsl.  Copied from libjava/configure.ac.
 AC_CACHE_CHECK([for socket libraries], gotools_cv_lib_sockets,

Reply via email to