electrum 4/5: improve speed (rm hook)
This commit is contained in:
+2
-44
@@ -10,13 +10,9 @@ PRODUCTION_VERSION := v5.1.0
|
||||
ENABLE_BRAIN := 1
|
||||
USE_SYSTEM_LZMA := 0
|
||||
USE_SYSTEM_ZLIB := 0
|
||||
USE_SYSTEM_LIBSECP256K1 := 0
|
||||
USE_SYSTEM_OPENCL := 0
|
||||
USE_SYSTEM_XXHASH := 0
|
||||
|
||||
# NOTE: USE_SYSTEM_LIBSECP256K1 set to 1 can come with a huge performance hit for Electrum 4-5
|
||||
# this is due to the public API (secp256k1.h) not exposing all the faster ECC operations we need
|
||||
|
||||
##
|
||||
## Detect Operating System
|
||||
##
|
||||
@@ -124,12 +120,6 @@ else
|
||||
DEPS_ZLIB_PATH := $(LIBRARY_DEV_ROOT_FOLDER)/
|
||||
endif
|
||||
|
||||
ifeq ($(USE_SYSTEM_LIBSECP256K1),0)
|
||||
DEPS_LIBSECP256K1_PATH := deps/secp256k1/
|
||||
else
|
||||
DEPS_LIBSECP256K1_PATH := $(LIBRARY_DEV_ROOT_FOLDER)/
|
||||
endif
|
||||
|
||||
ifeq ($(USE_SYSTEM_OPENCL),0)
|
||||
DEPS_OPENCL_PATH := deps/OpenCL-Headers
|
||||
else
|
||||
@@ -195,11 +185,6 @@ CFLAGS_ZLIB += -Wno-unused-parameter
|
||||
CFLAGS_ZLIB += -DIOAPI_NO_64
|
||||
endif
|
||||
|
||||
## because LIBSECP256K1 (Electrum 4/5)
|
||||
CFLAGS_LIBSECP256K1 += -Wno-unused-parameter
|
||||
CFLAGS_LIBSECP256K1 += -Wno-unused-function
|
||||
CFLAGS_LIBSECP256K1 += -Wno-nonnull-compare
|
||||
|
||||
ifeq ($(DEBUG),0)
|
||||
CFLAGS += -O2
|
||||
ifneq ($(UNAME),Darwin)
|
||||
@@ -238,24 +223,6 @@ ifeq ($(USE_SYSTEM_ZLIB),1)
|
||||
LFLAGS += -lz
|
||||
endif
|
||||
|
||||
# LIBSECP256K1
|
||||
|
||||
ifeq ($(USE_SYSTEM_LIBSECP256K1),1)
|
||||
LFLAGS += -lsecp256k1
|
||||
CFLAGS_LIBSECP256K1 += -DWITH_LIBSECP256K1
|
||||
|
||||
# NOT working if used only in CFLAGS_LIBSECP256K1 because we need to include secp256k1.h in the module too
|
||||
CFLAGS += -I$(DEPS_LIBSECP256K1_PATH)
|
||||
else
|
||||
CFLAGS_LIBSECP256K1 += -I$(DEPS_LIBSECP256K1_PATH)/src/
|
||||
|
||||
# files in deps/secp256k1/ include "include/secp256k1.h" so we need the parent folder too
|
||||
CFLAGS_LIBSECP256K1 += -I$(DEPS_LIBSECP256K1_PATH)
|
||||
|
||||
# NOT working if used only in CFLAGS_LIBSECP256K1 because we need to include secp256k1.h in the module too
|
||||
CFLAGS += -I$(DEPS_LIBSECP256K1_PATH)/include/
|
||||
endif
|
||||
|
||||
# OpenCL
|
||||
CFLAGS += -I$(DEPS_OPENCL_PATH)
|
||||
|
||||
@@ -333,10 +300,10 @@ endif # MSYS2
|
||||
EMU_OBJS_ALL := emu_general emu_inc_common emu_inc_platform emu_inc_scalar emu_inc_simd
|
||||
EMU_OBJS_ALL += emu_inc_rp emu_inc_rp_optimized
|
||||
EMU_OBJS_ALL += emu_inc_truecrypt_crc32 emu_inc_truecrypt_keyfile emu_inc_truecrypt_xts emu_inc_veracrypt_xts
|
||||
EMU_OBJS_ALL += emu_inc_hash_md4 emu_inc_hash_md5 emu_inc_hash_ripemd160 emu_inc_hash_sha1 emu_inc_hash_sha256 emu_inc_hash_sha384 emu_inc_hash_sha512 emu_inc_hash_streebog256 emu_inc_hash_streebog512
|
||||
EMU_OBJS_ALL += emu_inc_hash_md4 emu_inc_hash_md5 emu_inc_hash_ripemd160 emu_inc_hash_sha1 emu_inc_hash_sha256 emu_inc_hash_sha384 emu_inc_hash_sha512 emu_inc_hash_streebog256 emu_inc_hash_streebog512 emu_inc_ecc_secp256k1
|
||||
EMU_OBJS_ALL += emu_inc_cipher_aes emu_inc_cipher_camellia emu_inc_cipher_des emu_inc_cipher_kuznyechik emu_inc_cipher_serpent emu_inc_cipher_twofish
|
||||
|
||||
OBJS_ALL := affinity autotune backend benchmark bitmap bitops combinator common convert cpt cpu_crc32 debugfile dictstat dispatch dynloader event ext_ADL ext_cuda ext_nvapi ext_nvml ext_nvrtc ext_OpenCL ext_sysfs ext_lzma ext_secp256k1 filehandling folder hashcat hashes hlfmt hwmon induct interface keyboard_layout locking logfile loopback memory monitor mpsp outfile_check outfile pidfile potfile restore rp rp_cpu selftest slow_candidates shared status stdout straight terminal thread timer tuningdb usage user_options wordlist $(EMU_OBJS_ALL)
|
||||
OBJS_ALL := affinity autotune backend benchmark bitmap bitops combinator common convert cpt cpu_crc32 debugfile dictstat dispatch dynloader event ext_ADL ext_cuda ext_nvapi ext_nvml ext_nvrtc ext_OpenCL ext_sysfs ext_lzma filehandling folder hashcat hashes hlfmt hwmon induct interface keyboard_layout locking logfile loopback memory monitor mpsp outfile_check outfile pidfile potfile restore rp rp_cpu selftest slow_candidates shared status stdout straight terminal thread timer tuningdb usage user_options wordlist $(EMU_OBJS_ALL)
|
||||
|
||||
ifeq ($(ENABLE_BRAIN),1)
|
||||
OBJS_ALL += brain
|
||||
@@ -517,9 +484,6 @@ obj/%.NATIVE.o: $(DEPS_ZLIB_PATH)/%.c
|
||||
$(CC) -c $(CFLAGS_NATIVE) $(CFLAGS_ZLIB) $< -o $@ -fpic
|
||||
endif
|
||||
|
||||
obj/ext_secp256k1.NATIVE.o: src/ext_secp256k1.c
|
||||
$(CC) -c $(CFLAGS_NATIVE) $(CFLAGS_LIBSECP256K1) $< -o $@ -fpic
|
||||
|
||||
ifeq ($(USE_SYSTEM_XXHASH),0)
|
||||
ifeq ($(ENABLE_BRAIN),1)
|
||||
obj/%.NATIVE.o: $(DEPS_XXHASH_PATH)/%.c
|
||||
@@ -682,12 +646,6 @@ obj/%.WIN.o: $(DEPS_XXHASH_PATH)/%.c
|
||||
endif
|
||||
endif
|
||||
|
||||
obj/ext_secp256k1.LINUX.o: src/ext_secp256k1.c
|
||||
$(CC_LINUX) $(CFLAGS_CROSS_LINUX) $(CFLAGS_LIBSECP256K1) -c -o $@ $<
|
||||
|
||||
obj/ext_secp256k1.WIN.o: src/ext_secp256k1.c
|
||||
$(CC_WIN) $(CFLAGS_CROSS_WIN) $(CFLAGS_LIBSECP256K1) -c -o $@ $<
|
||||
|
||||
obj/combined.LINUX.a: $(LINUX_OBJS)
|
||||
$(AR_LINUX) rcs $@ $^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user