diff mbox series

[bug#66263,02/23] guix: gnu: Handle platforms without libc.

Message ID 20230929091627.7820-2-jean@foundationdevices.com
State New
Headers show
Series guix: Add avr as a platform. | expand

Commit Message

Jean-Pierre De Jesus DIAZ Sept. 29, 2023, 9:16 a.m. UTC
* guix/build-system/gnu.scm (standard-cross-packages): Do not add
  cross-libc as an input if the system doesn't support a libc.
---
 guix/build-system/gnu.scm | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index c1aa187c42..03a742f8b9 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -460,11 +460,15 @@  (define standard-cross-packages
            `(("cross-gcc" ,(gcc target
                                 #:xbinutils (binutils target)
                                 #:libc libc))
-             ("cross-libc" ,libc)
 
-             ;; MinGW's libc doesn't have a "static" output.
-             ,@(if (member "static" (package-outputs libc))
-                   `(("cross-libc:static" ,libc "static"))
+             ;; Some targets don't have a libc.
+             ,@(if libc
+                   `(("cross-libc" ,libc)
+
+                     ;; MinGW's libc doesn't have a "static" output.
+                     ,@(if (member "static" (package-outputs libc))
+                           `(("cross-libc:static" ,libc "static"))
+                           '()))
                    '()))))))))
 
 (define* (gnu-cross-build name