diff mbox series

[bug#65903,v2] gnu: Make vice tunable.

Message ID 6fc797b4ee3c49cb7fb730b4ba1664a733ebf0df.1694720820.git.raingloom@riseup.net
State New
Headers show
Series [bug#65903,v2] gnu: Make vice tunable. | expand

Commit Message

Csepp Sept. 14, 2023, 7:47 p.m. UTC
From: Csepp <raingloom@riseup.net>

* gnu/packages/emulators.scm (vice)[properties]: Set tunable? to #t.
---
 gnu/packages/emulators.scm | 2 ++
 1 file changed, 2 insertions(+)


base-commit: 07d43c66d5c11fef61f9846fefb97fa18e4764f1

Comments

Ludovic Courtès Sept. 17, 2023, 10:05 a.m. UTC | #1
Hi,

raingloom <raingloom@riseup.net> skribis:

> From: Csepp <raingloom@riseup.net>
>
> * gnu/packages/emulators.scm (vice)[properties]: Set tunable? to #t.
> ---
>  gnu/packages/emulators.scm | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
> index 1d50c9ef01..0fb4a5853b 100644
> --- a/gnu/packages/emulators.scm
> +++ b/gnu/packages/emulators.scm
> @@ -118,6 +118,8 @@ (define-public vice
>    (package
>      (name "vice")
>      (version "3.7.1")
> +    ;; without this it would use AVX even when it's not suported:

Oh I see.  It’s a problem that ‘tunable?’ in itself doesn’t solve.

The fix would be twofold: (1) remove ‘-march’ and similar compiler
arguments that cause it to generate code that assumes AVX availability,
and (2) add the ‘tune?’ property for those who want a fine-tuned binary.

Could you look into it?

Thanks,
Ludo’.
Csepp Sept. 18, 2023, 12:17 p.m. UTC | #2
Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> raingloom <raingloom@riseup.net> skribis:
>
>> From: Csepp <raingloom@riseup.net>
>>
>> * gnu/packages/emulators.scm (vice)[properties]: Set tunable? to #t.
>> ---
>>  gnu/packages/emulators.scm | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
>> index 1d50c9ef01..0fb4a5853b 100644
>> --- a/gnu/packages/emulators.scm
>> +++ b/gnu/packages/emulators.scm
>> @@ -118,6 +118,8 @@ (define-public vice
>>    (package
>>      (name "vice")
>>      (version "3.7.1")
>> +    ;; without this it would use AVX even when it's not suported:
>
> Oh I see.  It’s a problem that ‘tunable?’ in itself doesn’t solve.
>
> The fix would be twofold: (1) remove ‘-march’ and similar compiler
> arguments that cause it to generate code that assumes AVX availability,
> and (2) add the ‘tune?’ property for those who want a fine-tuned binary.
>
> Could you look into it?
>
> Thanks,
> Ludo’.

Umm, it definitely solved it on my machine, which doesn't have AVX.
If that's not a "proper" fix, then sure, I can try looking into it more.
But it seems to me like `tunable?` is already working as intended.
Ludovic Courtès Sept. 19, 2023, 9:45 a.m. UTC | #3
Hi,

Csepp <raingloom@riseup.net> skribis:

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

[...]

>> The fix would be twofold: (1) remove ‘-march’ and similar compiler
>> arguments that cause it to generate code that assumes AVX availability,
>> and (2) add the ‘tune?’ property for those who want a fine-tuned binary.
>>
>> Could you look into it?
>>
>> Thanks,
>> Ludo’.
>
> Umm, it definitely solved it on my machine, which doesn't have AVX.
> If that's not a "proper" fix, then sure, I can try looking into it more.
> But it seems to me like `tunable?` is already working as intended.

What I meant is that someone installing ‘vice’ without ‘--tune’ will
still get a binary that assumes AVXsomething, which may or may not work
on their machine.

The default binary (without ‘--tune’) should target baseline x86_64.

That’s why we need both fixes I mentioned above.

HTH!

Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 1d50c9ef01..0fb4a5853b 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -118,6 +118,8 @@  (define-public vice
   (package
     (name "vice")
     (version "3.7.1")
+    ;; without this it would use AVX even when it's not suported:
+    (properties '((tunable? . #t)))
     (source
      (origin
        (method url-fetch)