[Bug 246419] security/nss: fix build on powerpc64 elfv1

[email protected]
Newsgroups gmane.os.freebsd.devel.ppc
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246419

Piotr Kubaj <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #214418|0                           |1
        is obsolete|                            |
 Attachment #214418|maintainer-approval?(gecko@ |
              Flags|FreeBSD.org)                |
 Attachment #214420|                            |maintainer-approval?(gecko@
              Flags|                            |FreeBSD.org)

--- Comment #3 from Piotr Kubaj <[email protected]> ---
Created attachment 214420
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=214420&action=edit
v3

More correct solution.

The previous patch worked, but sha512-p8 wasn't included in the final binary
because USE_PPC_CRYPTO is disabled. sha512-p8 was just built, but not used
earlier. This is why all tests passed.

The problem with it is that the assembly is tailored to little-endian and won't
work on big-endian. However, there is a proper script to generate sha512-p8 for
big-endian, both elfv1 and elfv2. There is also a variant for 32-bit powerpc.
Ideally, this script should run always, but upstream seems to have forgotten
that and just put the generated sha512-p8 to the source. This patch takes care
of running this script.

Also, since USE_PPC_CRYPTO works on big-endian, put an option to enable that.
It will use VSX, which is available on POWER8 and newer. I made it available on
32 bits as well, just in case someone on VSX-capable machine wants to run
32-bit chroot or jail.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ppc
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.