diff mbox series

[bug#62231] Chez Scheme for Racket build on aarch64 (patch attached)

Message ID 87r0tdq51d.fsf@phrogstar.de
State New
Headers show
Series [bug#62231] Chez Scheme for Racket build on aarch64 (patch attached) | expand

Commit Message

Tim Johann March 24, 2023, 8:03 p.m. UTC
Hi Philip,

Happy to be of help.

Thanks for the pointers, here's the amended patch.  I hope it is to your liking.

cheers

Tim

Comments

Ludovic Courtès March 26, 2023, 2:26 p.m. UTC | #1
Hi,

Tim Johann <t1m@phrogstar.de> skribis:

> commit e3c514db745d48e5ef7f7abb7b45037341298b17
> Author: Tim Johann <t1m@phrogstar.de>
> Date:   Fri Mar 24 21:09:52 2023 +0100
>
>     gnu: chez-scheme-for-racket-bootstrap-bootfiles: change for aarch64.
>     
>     * gnu/packages/chez.scm (chez-scheme-for-racket-bootstrap-bootfiles):
>       Temporary change for build on aarch64, making racket available on aarch64.
>       Architecture autodetect in rktboot only addresses x86 archs, so far.
>       This work-around sets the architecture, looked up in translation table,
>       explicitly.  The long term solution should be to fix rktboot to include
>       other natively supported architectures in the autodetect mechanism.
>         cf. https://github.com/racket/racket/issues/3948
>       [arguments] use --machine even when architecture is supported by Racket's
>       fork of ChezScheme.

Applied!

Thank you Tim, and thanks Philip for reviewing.

Tim: please use ‘git format-patch’ in the future; the format here cannot
be ingested as-is by ‘git am’.

Ludo’.
diff mbox series

Patch

commit e3c514db745d48e5ef7f7abb7b45037341298b17
Author: Tim Johann <t1m@phrogstar.de>
Date:   Fri Mar 24 21:09:52 2023 +0100

    gnu: chez-scheme-for-racket-bootstrap-bootfiles: change for aarch64.
    
    * gnu/packages/chez.scm (chez-scheme-for-racket-bootstrap-bootfiles):
      Temporary change for build on aarch64, making racket available on aarch64.
      Architecture autodetect in rktboot only addresses x86 archs, so far.
      This work-around sets the architecture, looked up in translation table,
      explicitly.  The long term solution should be to fix rktboot to include
      other natively supported architectures in the autodetect mechanism.
        cf. https://github.com/racket/racket/issues/3948
      [arguments] use --machine even when architecture is supported by Racket's
      fork of ChezScheme.

diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index c6420a980e..ab6eaba6bd 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -692,10 +692,12 @@  (define-public chez-scheme-for-racket-bootstrap-bootfiles
                          (search-input-file (or native-inputs inputs)
                                             "/opt/racket-vm/bin/racket")
                          "../rktboot/main.rkt"
-                         #$@(if (racket-cs-native-supported-system?)
-                                #~()
-                                (let ((m (nix-system->pbarch-machine-type)))
-                                  #~("--machine" #$m)))))))))))))
+                         ;; Temporary handling of builds on non-x86 architectures,
+                         ;; see https://github.com/racket/racket/issues/3948
+                         ;; Autodetect in rktboot only addresses x86 archs, so far.
+                         #$@(let ((m (or (racket-cs-native-supported-system?)
+                                         (nix-system->pbarch-machine-type))))
+                              #~("--machine" #$m))))))))))))
     (supported-systems
      (package-supported-systems chez-scheme-for-racket))
     (home-page "https://github.com/racket/ChezScheme")