gnu: chez-scheme-for-racket: Fix supported systems.

This commit fixes the treatment of systems like "powerpc-w64-mingw32",
where the combination of architecture and kernel is not supported, even
though both are supported in other combinations. The build failure fixed
in b8fc916951 highlighted this problem:
see also <https://issues.guix.gnu.org/54292#6>. The correct support
status is specified by '%chez-features-table', which was added to
improve 'chez-upstream-features-for-system': this commit uses it to fix
the repair.

Once the issues in <https://racket.discourse.group/t/950> are resolved,
'chez-scheme-for-racket' and 'racket-vm-cs' will be able to run even on
systems for which native code generation is not supported. It's not
clear what behavior would be useful from 'nix-system->chez-machine':
since the current implementation is flawed and easy to misuse, we remove
it for now, replacing the remaining uses with
'racket-cs-native-supported-system?'.

* gnu/packages/chez.scm (nix-system->chez-machine): Remove it.
(racket-cs-native-supported-system?): New variable.
(chez-scheme-for-racket)[supported-systems]: Use it.
* gnu/packages/racket.scm (racket-vm-for-system): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Philip McGrath 2022-05-09 02:02:49 -04:00 committed by Ludovic Courtès
parent 9322697636
commit 4c0ac41ba4
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 22 additions and 17 deletions

View file

@ -190,8 +190,11 @@
(define* (racket-vm-for-system #:optional
(system (or (%current-target-system)
(%current-system))))
"Return 'racket-vm-cs' if it supports SYSTEM; 'racket-vm-bc' otherwise."
(if (nix-system->chez-machine system)
"Return 'racket-vm-cs' if we are able to build it for SYSTEM; 'racket-vm-bc'
otherwise."
;; Once we figure out the issues in https://racket.discourse.group/t/950,
;; we can use 'racket-vm-cs' everywhere.
(if (racket-cs-native-supported-system? system)
racket-vm-cs
racket-vm-bc))