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

  • Done
  • quality assurance status badge
Details
3 participants
  • Jean-Pierre De Jesus DIAZ
  • Ludovic Courtès
  • Simon Tournier
Owner
unassigned
Submitted by
Jean-Pierre De Jesus DIAZ
Severity
normal
J
J
Jean-Pierre De Jesus DIAZ wrote on 26 Jul 2023 17:37
(address . guix-patches@gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230726153729.4147922-1-jean@foundationdevices.com
* 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 <jean@foundationdevices.com>
---
guix/transformations.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (20 lines)
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
S
S
Simon Tournier wrote on 16 Aug 2023 18:51
87r0o3dj6v.fsf@gmail.com
Hi,

Thanks for the patch.


On Wed, 26 Jul 2023 at 17:37, Jean-Pierre De Jesus DIAZ via Guix-patches via <guix-patches@gnu.org> wrote:
Toggle quote (24 lines)
> * 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 <jean@foundationdevices.com>
> ---
> 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)

Ludo, WDYT?

Cheers,
simon
L
L
Ludovic Courtès wrote on 16 Aug 2023 23:54
Re: bug#64874: [PATCH] guix: tuned-package: Use target on cross-compile.
(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
87y1ia1wna.fsf_-_@gnu.org
Hi,

Simon Tournier <zimon.toutoune@gmail.com> skribis:

Toggle quote (27 lines)
> On Wed, 26 Jul 2023 at 17:37, Jean-Pierre De Jesus DIAZ via Guix-patches via <guix-patches@gnu.org> wrote:
>> * 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 <jean@foundationdevices.com>
>> ---
>> 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)
>
> Ludo, WDYT?

LGTM, thanks for the heads-up!

Ludo’.
L
L
Ludovic Courtès wrote on 17 Sep 2023 15:08
(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
87v8c9x7zy.fsf_-_@gnu.org
Hi,

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (2 lines)
> Simon Tournier <zimon.toutoune@gmail.com> skribis:

[...]

Toggle quote (4 lines)
>> Ludo, WDYT?
>
> LGTM, thanks for the heads-up!

I went ahead and applied it.

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 64874@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64874
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch