Created attachment 233171 [details] archivers/7-zip: fix build on armv7 The port current does not build on armv7. To fix this problem... - extend HWCAP detection patch to use correct auxvals on armv6/armv7 - disable optimised AES, CRC, SHA-1, and SHA-256 kernels on armv6/armv7 as they don't build with base clang An unfortunate side effect is that now the armv7 binary does not make use of any of the available instruction set extensions, even though it is capable of detecting their availability. Unfortunately clang support for NEON intrinsics is very spotty on 32 bit ARM. If desired, USE_GCC=yes and removing the patches that disable the optimised AES, CRC, SHA-1, and SHA-256 implementations might be a good way to obtain a binary with these in. Tested with Poudriere on armv7 arm64 FreeBSD 13. Please MFH if possible.
(In reply to Robert Clausecker from comment #0) > If desired, USE_GCC=yes and removing the patches that disable the optimised AES, CRC, SHA-1, and SHA-256 implementations might be a good way to obtain a binary with these in. I'm fine with any solution. What's your preference?
(In reply to Max Brazhnikov from comment #1) I'm open to anything. You are the maintainer, you need to make the decisions. Building with GCC would produce a better binary for armv6/armv7, but I think most armv6/armv7 systems FreeBSd supports do not have the required instruction set extensions anyway (though I would have to check). On the other hand, using clang removes a heavy dependency which makes things easier for source builders.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=96151ece4c41ec9a060a5347704f1a51323dd57f commit 96151ece4c41ec9a060a5347704f1a51323dd57f Author: Max Brazhnikov <makc@FreeBSD.org> AuthorDate: 2022-04-18 11:40:48 +0000 Commit: Max Brazhnikov <makc@FreeBSD.org> CommitDate: 2022-04-18 11:40:48 +0000 archivers/7-zip: fix build on armv6/armv7 - Extend HWCAP detection patch to use correct auxvals on armv6/armv7. - Disable optimised AES, CRC, SHA-1, and SHA-256 kernels on armv6/armv7 as they don't build with base clang. PR: 263244 Submitted by: Robert Clausecker archivers/7-zip/Makefile | 5 ++++ archivers/7-zip/files/patch-C_7zCrc.c (new) | 11 +++++++ archivers/7-zip/files/patch-C_Aes.c (new) | 11 +++++++ archivers/7-zip/files/patch-C_AesOpt.c (new) | 38 +++++++++++++++++++++++++ archivers/7-zip/files/patch-C_CpuArch.c | 26 +++++++++++------ archivers/7-zip/files/patch-C_Sha1Opt.c (new) | 11 +++++++ archivers/7-zip/files/patch-C_Sha256Opt.c (new) | 11 +++++++ 7 files changed, 104 insertions(+), 9 deletions(-)
Committed, thanks!
(In reply to Max Brazhnikov from comment #4) Please don't forget to MFH the patch.
A commit in branch 2022Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=93a0e053b7f8dd451ae4b4ac377f20a45e8df188 commit 93a0e053b7f8dd451ae4b4ac377f20a45e8df188 Author: Max Brazhnikov <makc@FreeBSD.org> AuthorDate: 2022-04-18 11:40:48 +0000 Commit: Max Brazhnikov <makc@FreeBSD.org> CommitDate: 2022-04-22 15:27:46 +0000 archivers/7-zip: fix build on armv6/armv7 - Extend HWCAP detection patch to use correct auxvals on armv6/armv7. - Disable optimised AES, CRC, SHA-1, and SHA-256 kernels on armv6/armv7 as they don't build with base clang. PR: 263244 Submitted by: Robert Clausecker (cherry picked from commit 96151ece4c41ec9a060a5347704f1a51323dd57f) archivers/7-zip/Makefile | 5 ++++ archivers/7-zip/files/patch-C_7zCrc.c (new) | 11 +++++++ archivers/7-zip/files/patch-C_Aes.c (new) | 11 +++++++ archivers/7-zip/files/patch-C_AesOpt.c (new) | 38 +++++++++++++++++++++++++ archivers/7-zip/files/patch-C_CpuArch.c | 26 +++++++++++------ archivers/7-zip/files/patch-C_Sha1Opt.c (new) | 11 +++++++ archivers/7-zip/files/patch-C_Sha256Opt.c (new) | 11 +++++++ 7 files changed, 104 insertions(+), 9 deletions(-)