git: 5bc83684d7f5 - main - sysutils/UEFITool: fix build on armv7

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Thu, 29 Sep 2022 14:30:39 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5bc83684d7f5948cc6da500c015f9974313f2544

commit 5bc83684d7f5948cc6da500c015f9974313f2544
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-09-29 14:30:00 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-09-29 14:30:35 +0000

    sysutils/UEFITool: fix build on armv7
---
 sysutils/UEFITool/files/patch-common_LZMA_SDK_C_CpuArch.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sysutils/UEFITool/files/patch-common_LZMA_SDK_C_CpuArch.c b/sysutils/UEFITool/files/patch-common_LZMA_SDK_C_CpuArch.c
index 64f8b1013f75..bcf8542c49c4 100644
--- a/sysutils/UEFITool/files/patch-common_LZMA_SDK_C_CpuArch.c
+++ b/sysutils/UEFITool/files/patch-common_LZMA_SDK_C_CpuArch.c
@@ -18,3 +18,16 @@
  
  #ifdef MY_CPU_ARM64
    #define MY_HWCAP_CHECK_FUNC(name) \
+@@ -432,8 +439,13 @@
+   MY_HWCAP_CHECK_FUNC_2(NEON, ASIMD)
+ // MY_HWCAP_CHECK_FUNC (ASIMD)
+ #elif defined(MY_CPU_ARM)
++#ifdef __linux__
+   #define MY_HWCAP_CHECK_FUNC(name) \
+   BoolInt CPU_IsSupported_ ## name() { return (getauxval(AT_HWCAP2) & (HWCAP2_ ## name)) ? 1 : 0; }
++#elif defined(__FreeBSD__)
++  #define MY_HWCAP_CHECK_FUNC(name) \
++  BoolInt CPU_IsSupported_ ## name() { uint32_t hwcaps = 0; elf_aux_info(AT_HWCAP2, &hwcaps, sizeof(hwcaps)); return (hwcaps & (HWCAP2_ ## name)) ? 1 : 0; }
++#endif
+   MY_HWCAP_CHECK_FUNC_2(NEON, NEON)
+ #endif