From 19b617370844ad48eab68e6fc4b9e47665f71710 Mon Sep 17 00:00:00 2001 From: Jean-Pierre De Jesus DIAZ Date: Wed, 26 Jul 2023 17:37:29 +0200 Subject: transformations: tuned-package: Use target on cross-compile. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/transformations.scm (tuned-package): Use either bag-target if available or bag-system to select the CPU architecture of the package that is going to be tuned. This enables the tuning of cross-compiled packages. Signed-off-by: Ludovic Courtès --- guix/transformations.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/transformations.scm b/guix/transformations.scm index ede914456f..9cba6bedab 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -529,8 +529,9 @@ system that builds code for MICRO-ARCHITECTURE; otherwise raise an error." ;; leading to an obscure build error, check whether the compiler is known ;; to support MICRO-ARCHITECTURE. If not, bail out. (let* ((lowered (apply lower args)) - (architecture (match (string-tokenize (bag-system lowered) - %not-hyphen) + (target (or (bag-target lowered) + (bag-system lowered))) + (architecture (match (string-tokenize target %not-hyphen) ((arch _ ...) arch))) (compiler (any (match-lambda ((label (? package? p) . _) -- cgit v1.2.3