From 86a7cd424e1ffd7f2a3141cdb3cea221663fb49b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 11 Jul 2025 16:37:48 +0300 Subject: 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 --- guix/transformations.scm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'guix') 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 ;;; Copyright © 2021 Marius Bakke ;;; Copyright © 2023 Sarthak Shah -;;; Copyright © 2023, 2024 Efraim Flashner +;;; Copyright © 2023-2025 Efraim Flashner ;;; Copyright © 2023 Ekaitz Zarraga ;;; ;;; 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) -- cgit v1.3