From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Support cross compilation Date: Tue, 09 Mar 2021 21:15:21 +0100 Message-ID: <87sg542iee.fsf@pobox.com> References: <20210214091646.9776-1-mail@cbaines.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10374"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: guile-devel@gnu.org To: Christopher Baines Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Mar 09 21:42:04 2021 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJjB6-0002ac-1y for guile-devel@m.gmane-mx.org; Tue, 09 Mar 2021 21:42:04 +0100 Original-Received: from localhost ([::1]:52314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJjB5-0001BN-04 for guile-devel@m.gmane-mx.org; Tue, 09 Mar 2021 15:42:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJilf-0004Uc-UJ for guile-devel@gnu.org; Tue, 09 Mar 2021 15:15:49 -0500 Original-Received: from fanzine.igalia.com ([178.60.130.6]:48685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJilV-0003Sw-Rt for guile-devel@gnu.org; Tue, 09 Mar 2021 15:15:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=+02J9Lom1Mh75dk8A8/ghH8mmqYPGey0su74QEKQOHM=; b=VSeg0tB/yi0CTBkGUNC1vgrUkVeBbo2r/WwvmanmfTIUWjT3X/ehzhaZ1SqWiFi1fBXIGA+pcnR75JwgQBwmDok/sXj8IyopKxRV2bpy95ZuUjT+lKD9JR8MWbkBL81+5Xdc19NRaAqbgEdl5tLWiBxyIc7wZZYLfn6vd8DoQbFZpSJn0vcUtcyJx7PNlWxliTZgexvjOZhP6mKYYlAKqu0ydfMezU6oqSMuFpZs3g4kBjqAN+GohDQtoZCXjzNO19eN/upmBiGEQRBxuzvCZYdltmstMT1tU/kdjVhU+zLUXDiigO79L+4vSiZMCew3tHWgCK1b+xCYQ46f5XPGBw==; Original-Received: from 82-65-63-215.subs.proxad.net ([82.65.63.215] helo=sparrow) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1lJilS-00082u-IW; Tue, 09 Mar 2021 21:15:34 +0100 In-Reply-To: <20210214091646.9776-1-mail@cbaines.net> (Christopher Baines's message of "Sun, 14 Feb 2021 09:16:46 +0000") Received-SPF: neutral client-ip=178.60.130.6; envelope-from=wingo@pobox.com; helo=fanzine.igalia.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20698 Archived-At: Hi :) Which library is this for? It doesn't appear to be guile itself. Andy On Sun 14 Feb 2021 10:16, Christopher Baines writes: > With these changes, I was able to cross-compile guile-lib to the GNU > Hurd, and use part of the library at least. > > * configure.ac: Set GUILE_TARGET when cross compiling. > * am/guile.mk: Pass GUILE_TARGET to guild compile. > --- > am/guile.mk | 2 +- > configure.ac | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/am/guile.mk b/am/guile.mk > index 3adfc4f..f08e58d 100644 > --- a/am/guile.mk > +++ b/am/guile.mk > @@ -47,4 +47,4 @@ GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat > SUFFIXES = .scm .go > .scm.go: > $(AM_V_GEN)$(top_builddir)/pre-inst-env \ > - guild compile $(GUILE_WARNINGS) -o "$@" "$<" > + guild compile $(GUILE_TARGET) $(GUILE_WARNINGS) -o "$@" "$<" > diff --git a/configure.ac b/configure.ac > index 07be121..0aa812f 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -67,6 +67,10 @@ GUILE_GLOBAL_SITE_DIR > GUILE_SITE_CCACHE_DIR > GUILE_FLAGS > > +if test \"$cross_compiling\" != no; then > + GUILE_TARGET=\"--target=$host_alias\" > + AC_SUBST([GUILE_TARGET]) > +fi > > AC_ARG_WITH( > [guile-site],