From patchwork Wed May 6 12:34:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 468908 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 166F61402B5 for ; Wed, 6 May 2015 22:35:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=UyYYaWRZ; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; q=dns; s=default; b=HIf9RJqzwlc89bj2 h9j1PjXTYk4ZkO3AaUmok57/h68d28tj/epTbc8SiOmY/ITnc+Q4It1Jmv7Rfomw ipMdrDgM9yTK/H8TshYTU4uJry+1ZusW6zgN+Q8Vdk3jWJ4FwPhWvcYBSPq/PAqA TXms4vNhQo+PozMf1WJNZYh+5w0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; s=default; bh=JwIrU/B7HJngHBGNimJU7N k7iIM=; b=UyYYaWRZr1BPg2cBDBXf3kdxV6LcQnLT5rTHHVZjD8QY+R3jAtNpYJ L9KgdTPVnpeM+whNUsE0ae2JrFkPPHIubUjxIq3sPzZBMUZXBWG1TIVQcnnqFsBP b/mDjJDg69HcJZ/xKi667GXUJ5eoJbGaOJydFS4OVA1SqEgs7nVXI= Received: (qmail 13292 invoked by alias); 6 May 2015 12:35:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 13281 invoked by uid 89); 6 May 2015 12:35:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL, BAYES_50 autolearn=ham version=3.3.2 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 06 May 2015 12:35:12 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53481) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1YpyXe-0006Mj-Gn for gcc-patches@gnu.org; Wed, 06 May 2015 08:35:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpyXY-00038t-MO for gcc-patches@gnu.org; Wed, 06 May 2015 08:35:10 -0400 Received: from einhorn.in-berlin.de ([192.109.42.8]:54856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpyXY-00032o-Bg for gcc-patches@gnu.org; Wed, 06 May 2015 08:35:04 -0400 X-Envelope-From: doko@ubuntu.com Received: from [192.168.42.228] (dslb-088-073-117-221.088.073.pools.vodafone-ip.de [88.73.117.221]) (authenticated bits=0) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id t46CYdGn016102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 6 May 2015 14:34:40 +0200 Message-ID: <554A0A5F.3060106@ubuntu.com> Date: Wed, 06 May 2015 14:34:39 +0200 From: Matthias Klose User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: "gcc-patches@gnu.org" , Ian Lance Taylor Subject: [patch] fix gotools cross build X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 192.109.42.8 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,