diff mbox

gotools patch committed: Build for host_alias = target_alias

Message ID CAOyqgcV-vht0f3i-4bXvyBPedOoi9cpPOc5AFndRLAceVOZ-yA@mail.gmail.com
State New
Headers show

Commit Message

Ian Lance Taylor June 13, 2017, 7:56 p.m. UTC
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  <iant@golang.org>

PR go/80964
* configure.ac: Set NATIVE if host_alias = target_alias.
* configure: Rebuild.
diff mbox

Patch

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,