/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/openssl/config/Makefile
86 строк
3 KB
Jamie Magee
deps: enable OpenSSL asm support for riscv64
10 июл 2026, 15:36
Не верифицирован
10 июл 2026, 15:36
d6cd5c1
Код
Авторство
О чём код?
# This Makefile is confirmed to be run only on Linux (CentOS and # Ubuntu). perl5 and gas(>=2.26) are needed. UNAME_S := $(shell uname -s) ifneq ($(UNAME_S),Linux) $(error This can be run only on Linux) endif PERL = perl # Supported architecture list ASM_ARCHS = aix64-gcc-as BSD-x86 BSD-x86_64 \ darwin64-x86_64-cc darwin-i386-cc darwin64-arm64-cc linux-aarch64 \ linux-armv4 linux-elf linux-x86_64 \ linux-ppc64le linux32-s390x linux64-s390x linux64-mips64\ linux64-riscv64 \ solaris-x86-gcc solaris64-x86_64-gcc VC-WIN64A VC-WIN32 NO_ASM_ARCHS = VC-WIN64-ARM linux64-loongarch64 CC = gcc FAKE_GCC = ../config/fake_gcc.pl CONFIGURE = ./Configure # no-tests: test dir is not included or used # no-shared: openssl-cli needs static link # no-afalgeng: old Linux kernel < 4.0 does not support it # enable-ssl-trace: cause the optional SSL_trace API to be built # zlib/brotli/zstd: enable compression libraries for TLS certificate # compression (RFC 8879). Record compression remains disabled at runtime # via SSL_OP_NO_COMPRESSION and sk_SSL_COMP_zero() in crypto_util.cc. # Include paths point to Node's bundled deps (relative to openssl/). COPTS = no-tests no-shared no-afalgeng enable-ssl-trace enable-fips \ zlib --with-zlib-include=../../zlib \ enable-brotli --with-brotli-include=../../brotli/c/include \ enable-zstd --with-zstd-include=../../zstd/lib # disable platform check in Configure NO_WARN_ENV = CONFIGURE_CHECKER_WARN=1 GENERATE = ./generate_gypi.pl OPSSL_SRC = ../openssl # Header files generated with Configure #INT_CFGS = bn_conf.h dso_conf.h INT_CFG_DIR = $(OPSSL_SRC)/include/crypto GEN_HEADERS = asn1 asn1t bio comp cmp cms conf configuration core_names crmf \ crypto ct err ess fipskey lhash ocsp opensslv pkcs12 pkcs7 \ safestack srp ssl ui x509_acert x509 x509v3 x509_vfy INTERNAL_GEN_HEADERS = param_names CRYPTO_GEN_HEADERS = bn_conf dso_conf PHONY = all clean replace generate_headers .PHONY: $(PHONY) #all: $(ASM_ARCHS) $(NO_ASM_ARCHS) generate_headers replace all: $(ASM_ARCHS) $(NO_ASM_ARCHS) generate_headers # Configure and generate openssl asm files for each archs $(ASM_ARCHS): cd $(OPSSL_SRC); $(NO_WARN_ENV) CC=$(CC) $(PERL) $(CONFIGURE) $(COPTS) $@; $(PERL) -w -I$(OPSSL_SRC) $(GENERATE) asm $@ "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}" "${INTERNAL_GEN_HEADERS}" # Confgure asm_avx2 and generate upto avx2 support cd $(OPSSL_SRC); $(NO_WARN_ENV) CC=$(FAKE_GCC) $(PERL) $(CONFIGURE) \ $(COPTS) $@; $(PERL) -w -I$(OPSSL_SRC) $(GENERATE) asm_avx2 $@ "${GEN_HEADERS}" "${CRYTO_GEN_HEADERS}" "${INTERNAL_GEN_HEADERS}" # Configure no-asm and generate no-asm sources cd $(OPSSL_SRC); $(NO_WARN_ENV) $(PERL) $(CONFIGURE) $(COPTS) \ no-asm $@; $(PERL) -w -I$(OPSSL_SRC) $(GENERATE) no-asm $@ "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}" "${INTERNAL_GEN_HEADERS}" $(NO_ASM_ARCHS): # Configure no-asm and generate no-asm sources cd $(OPSSL_SRC); $(NO_WARN_ENV) $(PERL) $(CONFIGURE) $(COPTS) \ no-asm $@; $(PERL) -w -I$(OPSSL_SRC) $(GENERATE) no-asm $@ "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}" "${INTERNAL_GEN_HEADERS}" generate_headers: @$(PERL) -w -I$(OPSSL_SRC) ./generate_headers.pl "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}" "${INTERNAL_GEN_HEADERS}" clean: find archs \( -name \*.S -o -name \*.s -o -name \*.asm -o \ -name \*.gypi -o -name \*.h -o -name \*.pm -o -name \*.rc \) -exec rm "{}" \;