1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-07 05:30:38 +02:00

build-system: cmake: Add cmake-system-processor-for-target.

* guix/build-system/cmake.scm (cmake-system-processor-for-target): New procedure.

Change-Id: I98277ed07c09bd41495782179494865c4c8458e8
Signed-off-by: Greg Hogan <code@greghogan.com>
This commit is contained in:
Dariqq
2025-07-09 08:57:19 +00:00
committed by Andreas Enge
parent a1c5edf016
commit cdef709ef3

View File

@@ -54,6 +54,22 @@
;; For avr, or1k-elf, xtensa-ath9k-elf
(_ "Generic")))
(define* (cmake-system-processor-for-target
#:optional (target (or (%current-target-system)
(%current-system))))
(match target
((? target-x86-32?) (substring target 0 4))
((? target-x86-64?) "x86_64")
((? target-arm32?) "armv7")
((? target-aarch64?) "aarch64")
((? target-loongarch64?) "loongarch64")
((? target-ppc64le?) "ppc64le")
((? target-ppc32?) "ppc")
((? target-riscv64?) "riscv64")
((? target-mips64el?) "mips64el")
((? target-avr?) "avr")
(_ (car (string-split target #\-)))))
(define %cmake-build-system-modules
;; Build-side modules imported by default.
`((guix build cmake-build-system)