[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57050] [PATCH v3 11/14] gnu: racket: Support cross-compiling the VM
From: |
Philip McGrath |
Subject: |
[bug#57050] [PATCH v3 11/14] gnu: racket: Support cross-compiling the VM packages. |
Date: |
Thu, 25 Aug 2022 04:54:13 -0400 |
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.
---
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 efabdd16f3..90e5e88be5 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -314,8 +314,11 @@ (define-public racket-vm-cgc
(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
@@ -403,8 +406,10 @@ (define-public racket-vm-bc
(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 _ '())
@@ -434,11 +439,17 @@ (define-public racket-vm-cs
(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)
@@ -452,7 +463,7 @@ (define-public racket-vm-cs
"--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))))
--
2.32.0
- [bug#57050] [PATCH v3 05/14] gnu: racket: Adjust patch for "/bin/sh" in rktio., (continued)
- [bug#57050] [PATCH v3 05/14] gnu: racket: Adjust patch for "/bin/sh" in rktio., Philip McGrath, 2022/08/25
- [bug#57050] [PATCH v3 07/14] gnu: Add Zuo., Philip McGrath, 2022/08/25
- [bug#57050] [PATCH v3 07/14] gnu: Add Zuo., Liliana Marie Prikler, 2022/08/25
- [bug#57050] [PATCH v3 07/14] gnu: Add Zuo., Efraim Flashner, 2022/08/25
- [bug#57050] [PATCH v3 07/14] gnu: Add Zuo., Philip McGrath, 2022/08/25
- [bug#57050] [PATCH v3 07/14] gnu: Add Zuo., Liliana Marie Prikler, 2022/08/26
- [bug#57050] [PATCH v3 06/14] gnu: chez-scheme: Fix use of "/bin/sh"., Philip McGrath, 2022/08/25
- [bug#57050] [PATCH v3 08/14] gnu: racket: Update to 8.6., Philip McGrath, 2022/08/25
- [bug#57050] [PATCH v3 08/14] gnu: racket: Update to 8.6., Liliana Marie Prikler, 2022/08/25
- [bug#57050] [PATCH v3 08/14] gnu: racket: Update to 8.6., Efraim Flashner, 2022/08/25
- [bug#57050] [PATCH v3 11/14] gnu: racket: Support cross-compiling the VM packages.,
Philip McGrath <=
- [bug#57050] [PATCH v3 09/14] gnu: chez-scheme: Make bootfiles regular inputs., Philip McGrath, 2022/08/25
- [bug#57050] [PATCH v3 12/14] gnu: chez-scheme-for-racket: Suport all systems., Philip McGrath, 2022/08/25
- [bug#57050] [PATCH v3 12/14] gnu: chez-scheme-for-racket: Suport all systems., Liliana Marie Prikler, 2022/08/25
- [bug#57050] [PATCH v3 12/14] gnu: chez-scheme-for-racket: Suport all systems., Efraim Flashner, 2022/08/25
- [bug#57050] [PATCH v3 12/14] gnu: chez-scheme-for-racket: Suport all systems., Philip McGrath, 2022/08/25
- [bug#57050] [PATCH v3 13/14] gnu: racket-vm-bc: Add workaround for ppc64le., Philip McGrath, 2022/08/25
- [bug#57050] [PATCH v3 10/14] gnu: chez-scheme-for-racket: Support cross-compilation., Philip McGrath, 2022/08/25
- [bug#57050] [PATCH v3 14/14] gnu: racket: Use Racket CS on all systems., Philip McGrath, 2022/08/25
- [bug#57050] [PATCH v3 14/14] gnu: racket: Use Racket CS on all systems., Liliana Marie Prikler, 2022/08/25
- [bug#57050] [PATCH v3 00/14] gnu: Update Racket to 8.6. Add Zuo., Thiago Jung Bauermann, 2022/08/26