Skip to content

Commit 0a0f15f

Browse files
shigekitargos
authored andcommitted
deps: fix MacOS and Win build for OpenSSL-1.1.1
Because llvm on MacOS does not support AVX-512, asm files need to be limited to AVX-2 support even when they are generated on Linux. fake_gcc.pl returns the fake llvm banner version for MacOS as if the assembler supports upto AVX-2. For Windows, makefiles for nmake were updated in OpenSSL-1.1.1 and they are rewritten into GNU makefile format by hand. PR-URL: #25381 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org> Backport-PR-URL: #25688
1 parent e204399 commit 0a0f15f

File tree

6 files changed

+8533
-2576
lines changed

6 files changed

+8533
-2576
lines changed

deps/openssl/config/Makefile

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ linux-armv4 linux-elf linux-x32 linux-x86_64 linux-ppc \
1515
linux-ppc64 linux-ppc64le linux32-s390x linux64-s390x \
1616
solaris-x86-gcc solaris64-x86_64-gcc VC-WIN64A VC-WIN32
1717

18+
CC = gcc
1819
CONFIGURE = ./Configure
1920
# no-comp: against CRIME attack
2021
# no-shared: openssl-cli needs static link
@@ -44,8 +45,11 @@ all: $(ARCHS) replace
4445
$(ARCHS):
4546
# Remove openssl .gitignore to follow nodejs .gitignore
4647
if [ -e $(GITIGNORE) ]; then rm $(GITIGNORE); fi
47-
# Confgure asm and generate asm sources
48-
cd $(OPSSL_SRC); $(NO_WARN_ENV) $(PERL) $(CONFIGURE) $(COPTS) $@;
48+
if [ "$(findstring darwin, $@)" = "" ]; then \
49+
cd $(OPSSL_SRC); $(NO_WARN_ENV) ARC=$@ CC=$(CC) $(PERL) $(CONFIGURE) $(COPTS) $@; \
50+
else \
51+
cd $(OPSSL_SRC); $(NO_WARN_ENV) ARC=$@ CC=./fake_gcc.pl $(PERL) $(CONFIGURE) $(COPTS) $@; \
52+
fi
4953
$(PERL) -w -I$(OPSSL_SRC) $(GENERATE) asm $@
5054
# Confgure no-asm and generate no-asm sources
5155
cd $(OPSSL_SRC); $(NO_WARN_ENV) $(PERL) $(CONFIGURE) $(COPTS) \
@@ -61,4 +65,4 @@ replace:
6165

6266
clean:
6367
find archs \( -name \*.S -o -name \*.s -o -name \*.asm -o \
64-
-name \*.gypi -o -name \*.h -o -name \*.pm \) -exec rm "{}" \;
68+
-name \*.gypi -o -name \*.h -o -name \*.pm -o -name \*.rc \) -exec rm "{}" \;

0 commit comments

Comments
 (0)