Error when building xmrig on termux (cmake) 
So, I'm trying to build xmrig on termux using cmake. But whenever I am executing the make command, It's throwing this error after reaching 6%


Consolidate compiler generated dependencies of target ethash [ 1%] Built target ethash Consolidate compiler generated dependencies of target ghostrider [ 1%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_echo.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 2%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_fugue.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 2%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_groestl.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 2%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_hamsi.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 3%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_jh.c.o clang-13: warning: optimization flag '-fno-tree-vrp' is not supported [-Wignored-optimization-argument] clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 3%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_keccak.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 4%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_luffa.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 4%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_shabal.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 4%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_shavite.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 5%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_simd.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 5%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_sha2.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 5%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_skein.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 6%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_whirlpool.c.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] [ 6%] Building CXX object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/ghostrider.cpp.o clang-13: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument] In file included from /data/data/com.termux/files/home/xmrig/src/crypto/ghostrider/ghostrider.cpp:43: /data/data/com.termux/files/home/xmrig/src/crypto/ghostrider/../../crypto/cn/CryptoNight.h:41:58: warning: 'ms_abi' calling convention is not supported for this target [-Wignored-attributes] typedef void(*cn_mainloop_fun_ms_abi)(cryptonight_ctx**) ABI_ATTRIBUTE; ^ /data/data/com.termux/files/home/xmrig/src/crypto/ghostrider/../../crypto/cn/CryptoNight.h:36:41: note: expanded from macro 'ABI_ATTRIBUTE' # define ABI_ATTRIBUTE __attribute__((ms_abi)) ^ In file included from /data/data/com.termux/files/home/xmrig/src/crypto/ghostrider/ghostrider.cpp:59: In file included from /data/data/com.termux/files/usr/lib/clang/13.0.1/include/x86intrin.h:13: /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:200:10: error: use of undeclared identifier '__builtin_ia32_readeflags_u32' return __builtin_ia32_readeflags_u32(); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:206:3: error: use of undeclared identifier '__builtin_ia32_writeeflags_u32' __builtin_ia32_writeeflags_u32(__f); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:288:10: error: use of undeclared identifier '__builtin_ia32_crc32qi' return __builtin_ia32_crc32qi(__C, __D); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:309:10: error: use of undeclared identifier '__builtin_ia32_crc32hi'; did you mean '__builtin_arm_crc32h'? return __builtin_ia32_crc32hi(__C, __D); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:309:10: note: '__builtin_arm_crc32h' declared here /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:330:10: error: use of undeclared identifier '__builtin_ia32_crc32si' return __builtin_ia32_crc32si(__C, __D); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:358:10: error: use of undeclared identifier '__builtin_ia32_rdpmc'; did you mean '__builtin_arm_dmb'? return __builtin_ia32_rdpmc(__A); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:358:10: note: '__builtin_arm_dmb' declared here /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:358:10: error: argument to '__builtin_arm_dmb' must be a constant integer return __builtin_ia32_rdpmc(__A); ^ ~~~ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:364:10: error: use of undeclared identifier '__builtin_ia32_rdtscp'; did you mean '__builtin_arm_rsrp'? return __builtin_ia32_rdtscp(__A); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:364:10: note: '__builtin_arm_rsrp' declared here /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:364:32: error: cannot initialize a parameter of type 'const char *' with an lvalue of type 'unsigned int *' return __builtin_ia32_rdtscp(__A); ^~~ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/ia32intrin.h:373:3: error: use of undeclared identifier '__builtin_ia32_wbinvd' __builtin_ia32_wbinvd(); ^ In file included from /data/data/com.termux/files/home/xmrig/src/crypto/ghostrider/ghostrider.cpp:59: In file included from /data/data/com.termux/files/usr/lib/clang/13.0.1/include/x86intrin.h:15: In file included from /data/data/com.termux/files/usr/lib/clang/13.0.1/include/immintrin.h:13: In file included from /data/data/com.termux/files/usr/lib/clang/13.0.1/include/x86gprintrin.h:15: /data/data/com.termux/files/usr/lib/clang/13.0.1/include/hresetintrin.h:42:27: error: invalid input constraint 'a' in asm __asm__ ("hreset $0" :: "a"(__eax)); ^ In file included from /data/data/com.termux/files/home/xmrig/src/crypto/ghostrider/ghostrider.cpp:59: In file included from /data/data/com.termux/files/usr/lib/clang/13.0.1/include/x86intrin.h:15: In file included from /data/data/com.termux/files/usr/lib/clang/13.0.1/include/immintrin.h:17: /data/data/com.termux/files/usr/lib/clang/13.0.1/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'? __builtin_ia32_emms(); ^ /data/data/com.termux/files/usr/include/c++/v1/math.h:651:12: note: '__builtin_isless' declared here return isless(__lcpp_x, __lcpp_y); ^ /data/data/com.termux/files/usr/include/c++/v1/../../math.h:311:22: note: expanded from macro 'isless' #define isless(x, y) __builtin_isless((x), (y)) ^ In file included from /data/data/com.termux/files/home/xmrig/src/crypto/ghostrider/ghostrider.cpp:59: In file included from /data/data/com.termux/files/usr/lib/clang/13.0.1/include/x86intrin.h:15: In file included from /data/data/com.termux/files/usr/lib/clang/13.0.1/include/immintrin.h:17: /data/data/com.termux/files/usr/lib/clang/13.0.1/include/mmintrin.h:33:25: error: too few arguments to function call, expected 2, have 0 __builtin_ia32_emms(); ~~~~~~~~~~~~~~~~~~~~^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/mmintrin.h:50:19: error: use of undeclared identifier '__builtin_ia32_vec_init_v2si' return (__m64)__builtin_ia32_vec_init_v2si(__i, 0); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/mmintrin.h:67:12: error: use of undeclared identifier '__builtin_ia32_vec_ext_v2si' return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/mmintrin.h:129:19: error: use of undeclared identifier '__builtin_ia32_packsswb' return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/mmintrin.h:159:19: error: use of undeclared identifier '__builtin_ia32_packssdw' return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/mmintrin.h:189:19: error: use of undeclared identifier '__builtin_ia32_packuswb' return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2); ^ /data/data/com.termux/files/usr/lib/clang/13.0.1/include/mmintrin.h:216:19: error: use of undeclared identifier '__builtin_ia32_punpckhbw' return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2); ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 1 warning and 20 errors generated. make[2]: *** [src/crypto/ghostrider/CMakeFiles/ghostrider.dir/build.make:300: src/crypto/ghostrider/CMakeFiles/ghostrider.dir/ghostrider.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:216: src/crypto/ghostrider/CMakeFiles/ghostrider.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

