diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2025-07-11 16:37:48 +0300 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2025-08-06 12:02:52 +0300 |
| commit | 86a7cd424e1ffd7f2a3141cdb3cea221663fb49b (patch) | |
| tree | e1a80bacbcac2efe6e48d9712681689569e3090e /guix | |
| parent | 681f70737ed03750a6e6dbdee6bcf5c487fbb886 (diff) | |
gnu: go-1.23: Add aarch64 micro-architecture compiler support.
* gnu/packages/golang.scm (%go-1.23-arm64-micro-architectures): New
variable.
(go-1.23)[compiler-cpu-architectures]: Add aarch64 micro-architectures.
* guix/transformations.scm (tuning-compiler): Update the go optimizer to
also support GOARM64.
Change-Id: I8825f9857e07c1634ea346d5a16ae9550f340e65
Diffstat (limited to 'guix')
| -rw-r--r-- | guix/transformations.scm | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/guix/transformations.scm b/guix/transformations.scm index 19a1cba206..198b55ed23 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2016-2024 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2021 Marius Bakke <marius@gnu.org> ;;; Copyright © 2023 Sarthak Shah <shahsarthakw@gmail.com> -;;; Copyright © 2023, 2024 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2023-2025 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2023 Ekaitz Zarraga <ekaitz@elenq.tech> ;;; ;;; This file is part of GNU Guix. @@ -500,7 +500,18 @@ actual compiler." (string=? next (search-next "go"))) (cond ((string-prefix? "arm" psabi) - (setenv "GOARM" (string-take-right psabi 1))) + ;; Parse the psabi to set the correct value + (cond ((= 5 (string-length psabi)) + (setenv "GOARM" (string-take-right psabi 1))) + ((string=? "a" (string-take-right psabi 1)) + (let ((version + (string-filter + (string->char-set ".v" char-set:digit) + psabi))) + (setenv "GOARM64" + (if (= 2 (string-length version)) + (string-append version ".0") + version)))))) ((string-prefix? "powerpc" psabi) (setenv "GOPPC64" psabi)) ((string-prefix? "x86_64" psabi) |
