Hi Niels,

On Mon, 2025-03-17 at 09:21 +0100, Niels Möller wrote:
> John Paul Adrian Glaubitz <[email protected]> writes:
> 
> > nettle fails to build from source on ppc64 due to uncondtional use of the 
> > lxvb16x
> > VSX instruction [1]:
> > 
> > Illegal instruction
> > FAIL: gcm
> > 
> > This seems to have been fixed upstream [1], but the fix has not been 
> > released yet.
> 
> I take it this could motivate a bugfix release, but on the debian side I
> guess you may want to backport fixes.

I'm fine with either way. There is nothing that blocks a new upstream release 
on Debian.

> > > [2] 
> > > https://git.lysator.liu.se/nettle/nettle/-/commit/2dffb58ae9e11a1626aa12a1ca9432338458fb44
> 
> I think you also need "Avoid using stxv/lxv instructions in powerpc64/p8
> files.",
> https://git.lysator.liu.se/nettle/nettle/-/commit/d891462ba3f6e39e3696b657dcb69e9869ad9762
> 
> BTW: You also ask in a different email that nettle shouldn't assume
> power8 (simplest way would be to disable all powerpc assembly for
> earlier processors), would you be able to propose or test configure
> changes for that? (https://git.lysator.liu.se/nettle/nettle/-/issues/7
> suggested testing for __VSX__, but I suspect that's slightly different from
> your use case?).

Testing for __VSX__ is already a very good idea. While at it, I would also test 
for the
presence of AltiVec as not all PowerPC targets automatically enable it 
(especially
embedded targets):

glaubitz@perotto:~$ echo | gcc -maltivec -E -dM - |grep ALTIVEC
#define __ALTIVEC__ 1
#define __APPLE_ALTIVEC__ 1
glaubitz@perotto:~$ echo | gcc -mvsx -E -dM - |grep VSX
#define __VSX__ 1
glaubitz@perotto:~$

I wasn't aware that lxvb16x was a VSX instruction when I wrote my first mail.

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply via email to