summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2022-09-21 09:42:30 +0200
committerPiotr Kubaj <pkubaj@FreeBSD.org>2022-09-21 09:42:30 +0200
commit1fd63cc34aa0fe50ce88d514b051e250d2a65e01 (patch)
tree32ac71791b3af491f13c60426ba94589b9bccc9b
parentmisc/py-boost-histogram: Update 1.3.1 -> 1.3.2 (diff)
sysutils/UEFITool: fix build on aarch64
-rw-r--r--sysutils/UEFITool/files/patch-common_LZMA_SDK_C_CpuArch.c20
1 files changed, 20 insertions, 0 deletions
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) \