mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 03:19:23 +00:00
Fixed keccak_bmi.cpp compilation without RandomX
This commit is contained in:
parent
bd6f68790e
commit
fb87e01986
3 changed files with 12 additions and 4 deletions
|
@ -156,6 +156,9 @@ endif()
|
|||
if (WITH_RANDOMX)
|
||||
set(HEADERS ${HEADERS} src/miner.h)
|
||||
set(SOURCES ${SOURCES} src/miner.cpp)
|
||||
else()
|
||||
set(HEADERS ${HEADERS} external/src/RandomX/src/cpu.hpp)
|
||||
set(SOURCES ${SOURCES} external/src/RandomX/src/cpu.cpp)
|
||||
endif()
|
||||
|
||||
if (WITH_GRPC)
|
||||
|
@ -267,6 +270,13 @@ endif()
|
|||
|
||||
add_definitions(/DZMQ_STATIC)
|
||||
|
||||
include(CheckIncludeFile)
|
||||
|
||||
check_include_file(asm/hwcap.h HAVE_HWCAP)
|
||||
if(HAVE_HWCAP)
|
||||
add_definitions(/DHAVE_HWCAP)
|
||||
endif()
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
check_cxx_source_compiles("int main(){ return __builtin_clzll(1);}" HAVE_BUILTIN_CLZLL)
|
||||
|
|
2
external/src/RandomX
vendored
2
external/src/RandomX
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 7ee603afebc063fa9c28a5350daee40be831d468
|
||||
Subproject commit 1b1f6d222d9c499b1a1ee40efa788bbcbfcb5513
|
|
@ -17,9 +17,7 @@
|
|||
|
||||
#include "common.h"
|
||||
#include "keccak.h"
|
||||
#ifdef WITH_RANDOMX
|
||||
#include "RandomX/src/cpu.hpp"
|
||||
#endif
|
||||
|
||||
namespace p2pool {
|
||||
|
||||
|
@ -120,7 +118,7 @@ NOINLINE void keccakf_plain(std::array<uint64_t, 25>& st)
|
|||
|
||||
void (*keccakf)(std::array<uint64_t, 25>&) = keccakf_plain;
|
||||
|
||||
#if defined(WITH_RANDOMX) && (defined(__x86_64__) || defined(_M_AMD64))
|
||||
#if defined(__x86_64__) || defined(_M_AMD64)
|
||||
static struct KeccakBMI_Check {
|
||||
KeccakBMI_Check() {
|
||||
if (randomx::Cpu().hasBmi()) {
|
||||
|
|
Loading…
Reference in a new issue