This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ping] Re: [patch] fix gotools cross build


still needed, both on the trunk and the branch.

On 06.05.2015 14:34, Matthias Klose wrote:
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,



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]