public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] fix gotools cross build
@ 2015-05-06 12:35 Matthias Klose
  2015-10-10 21:26 ` [ping] " Matthias Klose
  2015-10-19 16:44 ` Ian Lance Taylor
  0 siblings, 2 replies; 3+ messages in thread
From: Matthias Klose @ 2015-05-06 12:35 UTC (permalink / raw)
  To: gcc-patches, Ian Lance Taylor

Yes, it's documented that there is still some work to do for cross builds,
however a cross build for gotools currently fails.

The toplevel make always passes the GOC variable in the environment, overwriting
anything configured in gotools own configure.ac. Fixed by explictly using @GOC@
for GOCOMPILER.

gotools is a host project, and the cross_compiling check always fails. Not sure
if the $host != $target test is any better, but it works for me.

Ok for the trunk and the gcc-5 branch?

  Matthias

	* Makefile.am: Use GOC configured in configure.ac for cross builds.
        * configure.ac: Fix NATIVE conditional.
        * Makefile.in, configure: Regenerate.

--- gotools/Makefile.am
+++ gotools/Makefile.am
@@ -33,7 +33,7 @@
 # Use the compiler we just built.
 GOCOMPILER = $(GOC_FOR_TARGET)
 else
-GOCOMPILER = $(GOC)
+GOCOMPILER = @GOC@
 endif

 GOCFLAGS = $(CFLAGS_FOR_TARGET)
--- gotools/configure.ac
+++ gotools/configure.ac
@@ -46,7 +46,7 @@
 AC_PROG_CC
 AC_PROG_GO

-AM_CONDITIONAL(NATIVE, test "$cross_compiling" = no)
+AM_CONDITIONAL(NATIVE, test "$host" = "$target")

 dnl Test for -lsocket and -lnsl.  Copied from libjava/configure.ac.
 AC_CACHE_CHECK([for socket libraries], gotools_cv_lib_sockets,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-19 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-06 12:35 [patch] fix gotools cross build Matthias Klose
2015-10-10 21:26 ` [ping] " Matthias Klose
2015-10-19 16:44 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).