Date: Wed, 21 Sep 2022 07:47:27 GMT From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 1fd63cc34aa0 - main - sysutils/UEFITool: fix build on aarch64 Message-ID: <202209210747.28L7lRK2027083@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=1fd63cc34aa0fe50ce88d514b051e250d2a65e01 commit 1fd63cc34aa0fe50ce88d514b051e250d2a65e01 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2022-09-21 07:42:30 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2022-09-21 07:42:30 +0000 sysutils/UEFITool: fix build on aarch64 --- .../UEFITool/files/patch-common_LZMA_SDK_C_CpuArch.c | 20 ++++++++++++++++++++ 1 file changed, 20 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 new file mode 100644 index 000000000000..64f8b1013f75 --- /dev/null +++ b/sysutils/UEFITool/files/patch-common_LZMA_SDK_C_CpuArch.c @@ -0,0 +1,20 @@ +--- ../common/LZMA/SDK/C/CpuArch.c.orig 2022-09-10 16:08:06.000000000 +0200 ++++ ../common/LZMA/SDK/C/CpuArch.c 2022-09-21 09:40:04.461577000 +0200 +@@ -421,10 +421,17 @@ + + #ifdef USE_HWCAP + ++#ifdef __linux__ + #include <asm/hwcap.h> ++#endif + ++#ifdef __linux__ + #define MY_HWCAP_CHECK_FUNC_2(name1, name2) \ + BoolInt CPU_IsSupported_ ## name1() { return (getauxval(AT_HWCAP) & (HWCAP_ ## name2)) ? 1 : 0; } ++#elif defined(__FreeBSD__) ++ #define MY_HWCAP_CHECK_FUNC_2(name1, name2) \ ++ BoolInt CPU_IsSupported_ ## name1() { uint32_t hwcaps = 0; elf_aux_info(AT_HWCAP, &hwcaps, sizeof(hwcaps)); return (hwcaps & (HWCAP_ ## name2)) ? 1 : 0; } ++#endif + + #ifdef MY_CPU_ARM64 + #define MY_HWCAP_CHECK_FUNC(name) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202209210747.28L7lRK2027083>