1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-09 22:50:34 +02:00
Files
guix/gnu/packages/patches/guile-3.0.11-cross-compilation.patch
Ludovic Courtès a43d32577d gnu: guile: Add 3.0.11.
This reinstates 2b3782eb6e, which was reverted
in f54a032cec760ff2c3af87e5a45dd305a84dfa48; see
<https://codeberg.org/guix/guix/pulls/4747>.

* gnu/packages/guile.scm (guile-3.0.11): New variable.
(guile-3.0-latest): Add comment.
* gnu/packages/patches/guile-3.0.11-cross-compilation.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Change-Id: Id8ec934bb504750a5cefb5d417eab84175c47d01
Co-authored-by: Yelninei <yelninei@tutamail.com>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #5360
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
2026-01-25 21:23:26 +01:00

30 lines
1.0 KiB
Diff

Fix cross-compilation of Guile 3.0.11:
https://codeberg.org/guile/guile/issues/88
--- a/module/system/base/target.scm
+++ b/module/system/base/target.scm
@@ -45,15 +45,13 @@
;;;
;; Hacky way to get native pointer size without having to load (system
-;; foreign).
-(define-syntax %native-word-size
- (lambda (stx)
- (syntax-case stx ()
- (id (identifier? #'id)
- (cond
- ((< most-positive-fixnum (ash 1 32)) 4)
- ((< most-positive-fixnum (ash 1 64)) 8)
- (else (error "unexpected!" most-positive-fixnum)))))))
+;; foreign). Note: Use the value of 'most-positive-fixnum' available at
+;; run time, not a macro-expansion time, to ensure the correct value is
+;; used when cross-compiling.
+(define %native-word-size
+ (cond ((< most-positive-fixnum (ash 1 32)) 4)
+ ((< most-positive-fixnum (ash 1 64)) 8)
+ (else (error "unexpected!" most-positive-fixnum))))
(define %target-type (make-fluid %host-type))
(define %target-endianness (make-fluid (native-endianness)))