diff --git a/package/xmrig/0001-astrobwt-fix-build-with-gcc-4.8.patch b/package/xmrig/0001-astrobwt-fix-build-with-gcc-4.8.patch new file mode 100644 index 0000000000..694d7b203c --- /dev/null +++ b/package/xmrig/0001-astrobwt-fix-build-with-gcc-4.8.patch @@ -0,0 +1,40 @@ +From 72234ae73590fa93d837034a3fb48b71eb071a2a Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sun, 22 May 2022 20:24:14 +0200 +Subject: [PATCH] astrobwt: fix build with gcc-4.8 + +Fixes build error: + +xmrig-6.17.0/src/crypto/astrobwt/sort_indices2.cpp:40:24: error: missing binary operator before token "(" + #if __has_cpp_attribute(unlikely) + +found with the buildroot toolchain +arm-none-linux-gnueabi-gcc (Sourcery CodeBench Lite 2014.05-29) 4.8.3 20140320 (prerelease) + +Inspired by +https://reviews.llvm.org/rG91c32fd8c8fa395971a028f7091273fa2c8f44e6 + +Patch sent upstream: https://github.com/xmrig/xmrig/pull/3057 + +Signed-off-by: Bernd Kuhls +--- + src/crypto/astrobwt/sort_indices2.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/crypto/astrobwt/sort_indices2.cpp b/src/crypto/astrobwt/sort_indices2.cpp +index 2d86d462..3a70f619 100644 +--- a/src/crypto/astrobwt/sort_indices2.cpp ++++ b/src/crypto/astrobwt/sort_indices2.cpp +@@ -36,6 +36,9 @@ + #define RESTRICT + #endif + ++#ifndef __has_cpp_attribute ++#define __has_cpp_attribute(x) 0 ++#endif + + #if __has_cpp_attribute(unlikely) + #define UNLIKELY(X) (X) [[unlikely]] +-- +2.30.2 + diff --git a/package/xmrig/Config.in b/package/xmrig/Config.in index c5c6b3e37b..4c70abec6f 100644 --- a/package/xmrig/Config.in +++ b/package/xmrig/Config.in @@ -1,7 +1,7 @@ config BR2_PACKAGE_XMRIG bool "xmrig" # archs officially supported by upstream - depends on BR2_aarch64 || BR2_x86_64 || BR2_i386 + depends on BR2_ARM_CPU_ARMV7A || BR2_aarch64 || BR2_x86_64 || BR2_i386 depends on BR2_USE_MMU # libuv depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv @@ -16,7 +16,7 @@ config BR2_PACKAGE_XMRIG https://xmrig.com comment "xmrig needs a glibc or musl toolchain w/ NPTL, dynamic library, C++" - depends on BR2_aarch64 || BR2_x86_64 || BR2_i386 + depends on BR2_ARM_CPU_ARMV7A || BR2_aarch64 || BR2_x86_64 || BR2_i386 depends on BR2_USE_MMU depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \