[bug#75051,v2,03/15] utils: Add target-loongarch64?.

Message ID e42601ae52b6a8d36aec3022507917fdbaab1dce.1737736020.git.zhengjunjie@iscas.ac.cn
State New
Headers
Series guix: Add loongarch platform. |

Commit Message

Zheng Junjie Jan. 24, 2025, 4:39 p.m. UTC
  From: Zheng Junjie <873216071@qq.com>

* guix/utils.scm (target-loongarch64): New procedure.

Change-Id: I8d21bcf04d479937039f6f507b5460bb560fd8ec
---
 guix/utils.scm | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/guix/utils.scm b/guix/utils.scm
index 2d82329cb75..b0712aaac37 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -113,6 +113,7 @@  (define-module (guix utils)
             target-ppc64le?
             target-powerpc?
             target-riscv64?
+            target-loongarch64?
             target-mips64el?
             target-64bit?
             target-little-endian?
@@ -810,6 +811,10 @@  (define* (target-avr? #:optional (target (%current-target-system)))
   "Is the architecture of TARGET a variant of Microchip's AVR architecture?"
   (or (string=? target "avr") (string-prefix? "avr-" target)))
 
+(define* (target-loongarch64? #:optional (target (or (%current-target-system)
+                                                     (%current-system))))
+  (string-prefix? "loongarch64-" target))
+
 (define* (target-ppc32? #:optional (target (or (%current-target-system)
                                                (%current-system))))
   (string-prefix? "powerpc-" target))