unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Support cross compilation
@ 2021-02-14  9:16 Christopher Baines
  2021-03-09 20:15 ` Andy Wingo
  0 siblings, 1 reply; 3+ messages 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 related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Support cross compilation
  2021-02-14  9:16 [PATCH] Support cross compilation Christopher Baines
@ 2021-03-09 20:15 ` Andy Wingo
  2021-03-09 20:32   ` Christopher Baines
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Wingo @ 2021-03-09 20:15 UTC (permalink / raw)
  To: Christopher Baines; +Cc: guile-devel

Hi :)

Which library is this for?  It doesn't appear to be guile itself.

Andy

On Sun 14 Feb 2021 10:16, Christopher Baines <mail@cbaines.net> 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],



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Support cross compilation
  2021-03-09 20:15 ` Andy Wingo
@ 2021-03-09 20:32   ` Christopher Baines
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Baines @ 2021-03-09 20:32 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]


Andy Wingo <wingo@pobox.com> writes:

> Hi :)
>
> Which library is this for?  It doesn't appear to be guile itself.

Hey, it's for guile-lib.

> On Sun 14 Feb 2021 10:16, Christopher Baines <mail@cbaines.net> 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],


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-09 20:32 UTC | newest]

Thread overview: 3+ messages (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
2021-03-09 20:15 ` Andy Wingo
2021-03-09 20:32   ` Christopher Baines

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).