Subject: [PATCH v2 05/15] gnu: cross-base: Add cross-compiling support for loongarch64.

From: Zheng Junjie <[email-masked]>
Date: Sat, 25 Jan 2025 00:39:03 +0800

From: Zheng Junjie <[email-masked]>

gnu/packages/cross-base.scm (cross-kernel-headers/deprecated,
cross-kernel-headers*): When target loongarch64, use
linux-libre-headers-5.19.17.

Change-Id: Ib144ebf86428dddd92f5b899dc241a428f8dc374
---
 gnu/packages/cross-base.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index ad3616eaba0..a4e9c2a9cb1 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -418,7 +418,10 @@ (define* (cross-kernel-headers . args)
 
 (define* (cross-kernel-headers/deprecated target
                                           #:optional
-                                          (linux-headers linux-libre-headers)
+                                          (linux-headers
+                                           (if (target-loongarch64? target)
+                                               linux-libre-headers-5.19.17
+                                               linux-libre-headers))
                                           (xgcc (cross-gcc target))
                                           (xbinutils (cross-binutils target)))
   (warning (G_ "'cross-kernel-headers' must be used with keyword arguments~%"))
@@ -493,7 +496,9 @@ (define* (cross-mig target
 
 (define* (cross-kernel-headers* target
                                 #:key
-                                (linux-headers linux-libre-headers)
+                                (linux-headers (if (target-loongarch64? target)
+                                                   linux-libre-headers-5.19.17
+                                                   linux-libre-headers))
                                 (xgcc (cross-gcc target))
                                 (xbinutils (cross-binutils target)))
   "Return headers depending on TARGET."
-- 
2.47.1