unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Support cross compilation
@ 2021-02-14  9:16 Christopher Baines
  0 siblings, 0 replies; only message in thread
From: Christopher Baines @ 2021-02-14  9:16 UTC (permalink / raw)
  To: guile-devel

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],
-- 
2.30.0




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-14  9:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-14  9:16 [PATCH] Support cross compilation Christopher Baines

unofficial mirror of guile-devel@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-devel/0 guile-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-devel guile-devel/ https://yhetil.org/guile-devel \
		guile-devel@gnu.org
	public-inbox-index guile-devel

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.devel
	nntp://news.gmane.io/gmane.lisp.guile.devel


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git