[bug#75051,04/14] gnu: cross-base: Add cross-compiling support for loongarch64.

Message ID tencent_D6A4DA6409FD55E9DC9537958CD6626D820A@qq.com
State New
Headers
Series Add loongarch64 platform support. |

Commit Message

Zheng Junjie Dec. 23, 2024, 5:10 p.m. UTC
  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(-)
  

Patch

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."