summary refs log tree commit diff
diff options
context:
space:
mode:
authorJean-Pierre De Jesus DIAZ <jean@foundationdevices.com>2023-11-28 12:34:45 +0100
committerEfraim Flashner <efraim@flashner.co.il>2023-12-11 11:53:54 +0200
commitb40a44430f94a9381eb9c8170985bc44e73252f3 (patch)
treecffa75ae33a2c16378dd5eb1c96cc5c7559b8bb7
parent444a40c75a3caa4b21a8d50cbde72dc3f5d60e57 (diff)
downloadguix-b40a44430f94a9381eb9c8170985bc44e73252f3.tar.gz
guix: gnu-build-system: Handle missing libc.
* guix/build-system/gnu.scm (standard-cross-packages): Handle the case
  when `cross-libc` returns #f.

Change-Id: I85ee5456f10ff141d521a5f2d91267cd612c5616
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
-rw-r--r--guix/build-system/gnu.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index c1aa187c42..cdbb547773 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -460,10 +460,13 @@ is one of `host' or `target'."
            `(("cross-gcc" ,(gcc target
                                 #:xbinutils (binutils target)
                                 #:libc libc))
-             ("cross-libc" ,libc)
+             ;; Some targets don't have a libc. (e.g. *-elf targets).
+             ,@(if libc
+                   `(("cross-libc" ,libc))
+                   '())
 
              ;; MinGW's libc doesn't have a "static" output.
-             ,@(if (member "static" (package-outputs libc))
+             ,@(if (and libc (member "static" (package-outputs libc)))
                    `(("cross-libc:static" ,libc "static"))
                    '()))))))))