diff --git a/gnu/packages/chez-and-racket-bootstrap.scm b/gnu/packages/chez-and-racket-bootstrap.scm
index d2f78dfae2..669c54729d 100644
--- a/gnu/packages/chez-and-racket-bootstrap.scm
+++ b/gnu/packages/chez-and-racket-bootstrap.scm
@@ -45,7 +45,8 @@ (define-module (gnu packages chez-and-racket-bootstrap)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages xorg)
   #:use-module ((guix licenses)
-                #:prefix license:))
+                #:prefix license:)
+  #:export (chez-scheme-for-system))
 
 ;; Commentary:
 ;;
@@ -205,6 +206,16 @@ (define-module (gnu packages chez-and-racket-bootstrap)
 ;;
 ;; Code:
 
+(define* (chez-scheme-for-system #:optional
+                                 (system (or (%current-target-system)
+                                             (%current-system))))
+  "Return 'chez-scheme' if it supports SYSTEM without restrictions;
+'chez-scheme-racket-variant' otherwise."
+  (if (and=> (nix-system->chez-machine system)
+             chez-machine->upstream-restriction)
+      chez-scheme-for-racket
+      chez-scheme))
+
 (define (chez-machine->unthreaded mach)
   "Given a string MACH naming a Chez Scheme machine type, returns a string
 naming the unthreaded machine type for the same architecture and OS as MACH.
diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index be251798c3..d5007e0cfd 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -74,7 +74,7 @@ (define-public chez-srfi
        (file-name (git-file-name name version))))
     (build-system gnu-build-system)
     (native-inputs
-     (list chez-scheme))
+     (list (chez-scheme-for-system)))
     (arguments
      (list #:make-flags (chez-make-flags name version)
            #:test-target "test"
@@ -105,7 +105,7 @@ (define-public chez-web
           (base32 "1dq25qygyncbfq4kwwqqgyyakfqjwhp5q23vrf3bff1p66nyfl3b"))))
       (build-system gnu-build-system)
       (native-inputs
-       (list chez-scheme
+       (list (chez-scheme-for-system)
              ghostscript
              ;; FIXME: This package fails to build with the error:
              ;;     mktexpk: don't know how to create bitmap font for bchr8r
@@ -170,7 +170,7 @@ (define-public chez-sockets
           (base32 "1n5fbwwz51fdzvjackgmnsgh363g9inyxv7kmzi0469cwavwcx5m"))))
       (build-system gnu-build-system)
       (native-inputs
-       (list chez-scheme
+       (list (chez-scheme-for-system)
              chez-web
              (texlive-updmap.cfg (list texlive-pdftex))))
       (arguments
@@ -256,7 +256,7 @@ (define-public chez-matchable
     (inputs
      (list chez-srfi)) ; for tests
     (native-inputs
-     (list chez-scheme))
+     (list (chez-scheme-for-system)))
     (arguments
      (list #:make-flags (chez-make-flags name version)
            #:test-target "test"
@@ -288,7 +288,7 @@ (define-public chez-irregex
     (propagated-inputs
      (list chez-srfi)) ; for irregex-utils
     (native-inputs
-     (list chez-scheme))
+     (list (chez-scheme-for-system)))
     (arguments
      (list #:make-flags (chez-make-flags name version)
            #:test-target "test"
@@ -319,7 +319,7 @@ (define-public chez-fmt
     (propagated-inputs
      (list chez-srfi)) ; for irregex-utils
     (native-inputs
-     (list chez-scheme))
+     (list (chez-scheme-for-system)))
     (arguments
      (list #:make-flags (chez-make-flags name version)
            #:test-target "chez-check"
@@ -382,7 +382,7 @@ (define string->uninterned-symbol
     (inputs
      (list chez-srfi))       ; for tests
     (native-inputs
-     (list chez-scheme))
+     (list (chez-scheme-for-system)))
     (arguments
      (list #:make-flags (chez-make-flags name version)
            #:test-target "test"
@@ -413,7 +413,7 @@ (define-public chez-scmutils
     (inputs
      (list chez-srfi))       ; for tests
     (native-inputs
-     (list chez-scheme))
+     (list (chez-scheme-for-system)))
     (propagated-inputs
      (list chez-mit chez-srfi))
     (arguments
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 02694b636a..f445ab0f25 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -451,7 +451,7 @@ (define-public emacs-geiser-chez
                 (string-append
                  "(eval-after-load 'geiser-impl '" all ")"))))))))
     (inputs
-     (list chez-scheme))
+     (list (chez-scheme-for-system)))
     (propagated-inputs
      (list emacs-geiser))
     (home-page "https://nongnu.org/geiser/")
diff --git a/gnu/packages/loko.scm b/gnu/packages/loko.scm
index 74a649b8a1..a7ab12a0c4 100644
--- a/gnu/packages/loko.scm
+++ b/gnu/packages/loko.scm
@@ -71,7 +71,7 @@ (define-public loko-scheme
              #t)))))
     (native-inputs
      `(("akku" ,akku)
-       ("chez-scheme" ,chez-scheme)
+       ("chez-scheme" ,(chez-scheme-for-system))
        ("struct" ,guile-struct-pack)
        ("laesare" ,guile-laesare)
        ("pfds" ,guile-pfds)
