From: Christopher Baines <mail@cbaines.net>
To: guile-devel@gnu.org
Subject: [PATCH] Support cross compilation
Date: Sun, 14 Feb 2021 09:16:46 +0000 [thread overview]
Message-ID: <20210214091646.9776-1-mail@cbaines.net> (raw)
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
next reply other threads:[~2021-02-14 9:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-14 9:16 Christopher Baines [this message]
2021-03-09 20:15 ` [PATCH] Support cross compilation Andy Wingo
2021-03-09 20:32 ` Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210214091646.9776-1-mail@cbaines.net \
--to=mail@cbaines.net \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).