Subject: bug#64874: closed (Re: bug#64874: [PATCH] guix: tuned-package: Use target on cross-compile.)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 17 Sep 2023 13:09:02 +0000

Your bug report

#64874: [PATCH] guix: tuned-package: Use target on cross-compile.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
64874: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64874
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#64874: [PATCH] guix: tuned-package: Use target on cross-compile.
From: Ludovic Courtès <[email-masked]>
To: Simon Tournier <[email-masked]>
Cc: [email-masked], [email-masked], [email-masked], [email-masked], Jean-Pierre De Jesus DIAZ <[email-masked]>, [email-masked], [email-masked]
Date: Sun, 17 Sep 2023 15:08:17 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Ludovic Courtès <[email-masked]> skribis:

> Simon Tournier <[email-masked]> skribis:

[...]

>> Ludo, WDYT?
>
> LGTM, thanks for the heads-up!

I went ahead and applied it.

Ludo’.

Subject: [PATCH] guix: tuned-package: Use target on cross-compile.
From: Jean-Pierre De Jesus DIAZ <[email-masked]>
To: [email-masked]
Cc: Jean-Pierre De Jesus DIAZ <[email-masked]>
Date: Wed, 26 Jul 2023 17:37:29 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

* 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: Jean-Pierre De Jesus DIAZ <[email-masked]>
---
 guix/transformations.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/guix/transformations.scm b/guix/transformations.scm
index 92d9c89c0e..76d0208bf1 100644
--- a/guix/transformations.scm
+++ b/guix/transformations.scm
@@ -510,8 +510,9 @@ (define (lower* . args)
     ;; 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) . _)

base-commit: cf9904bcc8dd03e73675475bb4d8746dc434e415
-- 
2.34.1