new file mode 100644
@@ -0,0 +1,40 @@
+From 72234ae73590fa93d837034a3fb48b71eb071a2a Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+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 <bernd.kuhls@t-online.de>
+---
+ 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
+
@@ -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 || \
Available since 2017: https://github.com/xmrig/xmrig/commit/aa4f8b6fa78eb8331b5927ba5315b926ac75ce9c We noticed it since its addition to the readme: https://github.com/xmrig/xmrig/commit/97869f3347a621d9dbf20210289ce10c68a5bd34 Added patch to fix build with gcc-4.8. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> --- Build-tested using this defconfig: BR2_PACKAGE_XMRIG=y andes-nds32 [ 1/45]: SKIPPED arm-aarch64 [ 2/45]: OK bootlin-aarch64-glibc [ 3/45]: OK bootlin-arcle-hs38-uclibc [ 4/45]: SKIPPED bootlin-armv5-uclibc [ 5/45]: SKIPPED bootlin-armv7-glibc [ 6/45]: OK bootlin-armv7m-uclibc [ 7/45]: SKIPPED bootlin-armv7-musl [ 8/45]: OK bootlin-m68k-5208-uclibc [ 9/45]: SKIPPED bootlin-m68k-68040-uclibc [10/45]: SKIPPED bootlin-microblazeel-uclibc [11/45]: SKIPPED bootlin-mipsel32r6-glibc [12/45]: SKIPPED bootlin-mipsel-uclibc [13/45]: SKIPPED bootlin-nios2-glibc [14/45]: SKIPPED bootlin-openrisc-uclibc [15/45]: SKIPPED bootlin-powerpc64le-power8-glibc [16/45]: SKIPPED bootlin-powerpc-e500mc-uclibc [17/45]: SKIPPED bootlin-riscv32-glibc [18/45]: SKIPPED bootlin-riscv64-glibc [19/45]: SKIPPED bootlin-riscv64-musl [20/45]: SKIPPED bootlin-sh4-uclibc [21/45]: SKIPPED bootlin-sparc64-glibc [22/45]: SKIPPED bootlin-sparc-uclibc [23/45]: SKIPPED bootlin-x86-64-glibc [24/45]: OK bootlin-x86-64-musl [25/45]: OK bootlin-x86-64-uclibc [26/45]: SKIPPED bootlin-xtensa-uclibc [27/45]: SKIPPED br-arm-basic [28/45]: SKIPPED br-arm-full-nothread [29/45]: SKIPPED br-arm-full-static [30/45]: SKIPPED br-i386-pentium4-full [31/45]: SKIPPED br-i386-pentium-mmx-musl [32/45]: OK br-mips64-n64-full [33/45]: SKIPPED br-mips64r6-el-hf-glibc [34/45]: SKIPPED br-powerpc-603e-basic-cpp [35/45]: SKIPPED br-powerpc64-power7-glibc [36/45]: SKIPPED linaro-aarch64-be [37/45]: SKIPPED linaro-aarch64 [38/45]: OK linaro-arm [39/45]: OK sourcery-arm-armv4t [40/45]: SKIPPED sourcery-arm [41/45]: SKIPPED sourcery-arm-thumb2 [42/45]: OK sourcery-mips64 [43/45]: SKIPPED sourcery-mips [44/45]: SKIPPED sourcery-nios2 [45/45]: SKIPPED 45 builds, 35 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed ...0001-astrobwt-fix-build-with-gcc-4.8.patch | 40 +++++++++++++++++++ package/xmrig/Config.in | 4 +- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 package/xmrig/0001-astrobwt-fix-build-with-gcc-4.8.patch