View | Details | Raw Unified | Return to bug 255917 | Differences between
and this patch

Collapse All | Expand All

(-)b/net-p2p/xmrig/Makefile (-1 lines)
Lines 11-17 COMMENT= High performance Monero (XMR) CPU miner Link Here
11
LICENSE=	GPLv3
11
LICENSE=	GPLv3
12
LICENSE_FILE=	${WRKSRC}/LICENSE
12
LICENSE_FILE=	${WRKSRC}/LICENSE
13
13
14
BROKEN_aarch64=	fails to compile: src/common/cpu/BasicCpuInfo_arm.cpp:30:13: fatal error: 'asm/hwcap.h' file not found
15
BROKEN_powerpc64=	fails to compile: g++9: error: unrecognized command line option '-maes'; did you mean '-mads'?
14
BROKEN_powerpc64=	fails to compile: g++9: error: unrecognized command line option '-maes'; did you mean '-mads'?
16
BROKEN_riscv64=		fails to compile: /nxb-bin/usr/lib/clang/11.0.0/include/cpuid.h:11:2: error: this header is for x86 only
15
BROKEN_riscv64=		fails to compile: /nxb-bin/usr/lib/clang/11.0.0/include/cpuid.h:11:2: error: this header is for x86 only
17
16
(-)b/net-p2p/xmrig/files/patch-src_backend_cpu_platform_BasicCpuInfo__arm.cpp (+34 lines)
Added Link Here
1
--- src/backend/cpu/platform/BasicCpuInfo_arm.cpp.orig	2021-05-16 08:56:58 UTC
2
+++ src/backend/cpu/platform/BasicCpuInfo_arm.cpp
3
@@ -26,11 +26,14 @@
4
 #include <thread>
5
 
6
 
7
-#if __ARM_FEATURE_CRYPTO && !defined(__APPLE__)
8
+#if __ARM_FEATURE_CRYPTO && !(defined(__APPLE__) || defined(__FreeBSD__))
9
 #   include <sys/auxv.h>
10
 #   include <asm/hwcap.h>
11
 #endif
12
 
13
+#if defined (__FreeBSD__)
14
+#include <machine/armreg.h>
15
+#endif
16
 
17
 #include "backend/cpu/platform/BasicCpuInfo.h"
18
 #include "3rdparty/rapidjson/document.h"
19
@@ -62,8 +65,14 @@ xmrig::BasicCpuInfo::BasicCpuInfo() :
20
 #   endif
21
 
22
 #   if __ARM_FEATURE_CRYPTO
23
-#   if !defined(__APPLE__)
24
+#   if !(defined(__APPLE__) || defined(__FreeBSD__))
25
     m_flags.set(FLAG_AES, getauxval(AT_HWCAP) & HWCAP_AES);
26
+#   elif defined(__FreeBSD__)
27
+    uint64_t id_aa64isar0;
28
+    id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1);
29
+    if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_BASE) {
30
+        m_flags.set(FLAG_AES, true);
31
+    }
32
 #   else
33
     m_flags.set(FLAG_AES, true);
34
 #   endif

Return to bug 255917