[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
17/27: gnu: racket: Support cross-compiling the VM packages.
From: |
guix-commits |
Subject: |
17/27: gnu: racket: Support cross-compiling the VM packages. |
Date: |
Sun, 4 Sep 2022 17:20:32 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit cb0d106590400eefb74c1d747805b3014fe645d0
Author: Philip McGrath <philip@philipmcgrath.com>
AuthorDate: Sat Aug 27 14:55:51 2022 -0400
gnu: racket: Support cross-compiling the VM packages.
Cross-compilation works for 'racket-vm-cgc', 'racket-vm-bc', and
'racket-vm-cs'. These changes are not enough to cross-compile
'racket-minimal' or 'racket': that would require building and loading
cross-compilation pluggins for 'racket-vm-cs', which will be much
easier once we can build the package 'raco-cross'.
* gnu/packages/racket.scm (racket-vm-cgc): Add 'this-package' when
cross-compiling.
(racket-vm-bc)[native-inputs]: Adjust accordingly.
(racket-vm-cs)[native-inputs]: Use 'racket-vm-cs' instead of
'racket-vm-bc' when cross-compiling. Adapt to changes to
'racket-vm-cgc'.
[arguments]<#:configure-flags>: Fix '--enable-scheme' for
cross-compilation.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/racket.scm | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 349cf38e07..4fcdd2f721 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -312,8 +312,11 @@ One of the early layers implements macros.")
(source %racket-origin)
(inputs (list ncurses ;; <- common to all variants (for #%terminal)
libffi)) ;; <- only for BC variants
- (native-inputs (list zuo ;; <- for all variants
- libtool)) ;; <- only for BC variants
+ (native-inputs (cons* zuo ;; <- for all variants
+ libtool ;; <- only for BC variants
+ (if (%current-target-system)
+ (list this-package)
+ '())))
(outputs '("out" "debug"))
(build-system gnu-build-system)
(arguments
@@ -401,8 +404,10 @@ code to use the 3M garbage collector.")
(inherit racket-vm-cgc)
(name "racket-vm-bc")
(native-inputs
- (modify-inputs (package-native-inputs racket-vm-cgc)
- (prepend racket-vm-cgc)))
+ (if (%current-target-system)
+ (package-native-inputs racket-vm-cgc)
+ (modify-inputs (package-native-inputs racket-vm-cgc)
+ (prepend racket-vm-cgc))))
(arguments
(substitute-keyword-arguments (package-arguments racket-vm-cgc)
((#:configure-flags _ '())
@@ -432,11 +437,17 @@ collector, 3M (``Moving Memory Manager'').")
(prepend zlib lz4)
(delete "libffi")))
(native-inputs
- (modify-inputs (package-native-inputs racket-vm-cgc)
- (delete "libtool")
- (prepend chez-scheme-for-racket
- chez-nanopass-bootstrap
- racket-vm-bc)))
+ (let ((native-inputs (package-native-inputs racket-vm-cgc)))
+ (modify-inputs (if (%current-target-system)
+ (modify-inputs native-inputs
+ (delete "racket-vm-cgc"))
+ native-inputs)
+ (delete "libtool")
+ (prepend chez-scheme-for-racket
+ chez-nanopass-bootstrap
+ (if (%current-target-system)
+ racket-vm-cs
+ racket-vm-bc)))))
(arguments
(substitute-keyword-arguments (package-arguments racket-vm-cgc)
((#:phases those-phases #~%standard-phases)
@@ -450,7 +461,7 @@ collector, 3M (``Moving Memory Manager'').")
"--enable-libz"
"--enable-lz4"
(string-append "--enable-scheme="
- #$(this-package-native-input
+ #+(this-package-native-input
"chez-scheme-for-racket")
"/bin/scheme")
#$racket-vm-common-configure-flags))))
- 21/27: gnu: hashcat: Don't embed timestamp, fixing reproducibility., (continued)
- 21/27: gnu: hashcat: Don't embed timestamp, fixing reproducibility., guix-commits, 2022/09/04
- 20/27: gnu: racket: Use Racket CS on all systems., guix-commits, 2022/09/04
- 25/27: gnu: Add texlive-latex-hyphenat., guix-commits, 2022/09/04
- 02/27: services: upower: Default to a percentage-based policy., guix-commits, 2022/09/04
- 04/27: store: Open daemon connections with SOCK_CLOEXEC., guix-commits, 2022/09/04
- 06/27: guix system: Do not use 'vm-image.tmpl' in tests., guix-commits, 2022/09/04
- 07/27: gnu: stex: Update to 1.2.2-2.afa6075., guix-commits, 2022/09/04
- 09/27: etc: teams: Add racket team., guix-commits, 2022/09/04
- 10/27: etc: teams: Add entry for Philip McGrath., guix-commits, 2022/09/04
- 15/27: gnu: chez-scheme: Make bootfiles regular inputs., guix-commits, 2022/09/04
- 17/27: gnu: racket: Support cross-compiling the VM packages.,
guix-commits <=
- 18/27: gnu: chez-scheme-for-racket: Support all systems., guix-commits, 2022/09/04
- 19/27: gnu: racket-vm-bc: Add workaround for ppc64le., guix-commits, 2022/09/04
- 22/27: gnu: hashcat: Unbundle everything but LZMA-SDK., guix-commits, 2022/09/04
- 24/27: gnu: hashcat: Fix cross-compilation., guix-commits, 2022/09/04
- 23/27: gnu: hashcat: Rewrite with G-exps., guix-commits, 2022/09/04
- 26/27: gnu: texlive-caption: Fix description., guix-commits, 2022/09/04
- 27/27: gnu: Add wmamixer., guix-commits, 2022/09/04
- 08/27: gnu: stex: Fix read-only gifs and math directories., guix-commits, 2022/09/04
- 11/27: gnu: racket: Adjust patch for "/bin/sh" in rktio., guix-commits, 2022/09/04