mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
deps: add x32 and arm64 support for opensslconf.h
linux-x32 and linux-aarch64(arm64) are officially supported in openssl-1.0.2. With this fix opensslconf.h for these new architectures can be generated by Makefile. The patch for opensslconf.h of linux-x32 with Makefile was removed. For the fix of opensslconf.h in WIN32/WIN64, adding defines of OPENSSL_NO_DYNAMIC_ENGINE and OPENSSL_NO_CAPIENG move to openssl.gypi so that we no longer need insert a patch with Makefile and removed it. Fixes: https://github.com/iojs/io.js/issues/589 PR-URL: https://github.com/iojs/io.js/pull/1389 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
33
deps/openssl/config/Makefile
vendored
33
deps/openssl/config/Makefile
vendored
@@ -3,8 +3,8 @@ CONFIGURE = ./Configure
|
||||
COPT = no-shared no-symlinks
|
||||
|
||||
ARCHS = BSD-x86 BSD-x86_64 VC-WIN32 VC-WIN64A darwin64-x86_64-cc \
|
||||
darwin-i386-cc linux-armv4 linux-elf linux-x86_64 solaris-x86-gcc \
|
||||
solaris64-x86_64-gcc
|
||||
darwin-i386-cc linux-aarch64 linux-armv4 linux-elf linux-x32 \
|
||||
linux-x86_64 solaris-x86-gcc solaris64-x86_64-gcc
|
||||
|
||||
CFG = opensslconf.h
|
||||
SRC_CFG = ../openssl/crypto/$(CFG)
|
||||
@@ -14,36 +14,17 @@ BACKUP_EXT = iojsbackup
|
||||
# OPENSSL_CPUID_OBJ is defined in openssl.gypi for use --openssl-no-asm
|
||||
CPUIDFIX = 's/\#define OPENSSL_CPUID_OBJ$$//;'
|
||||
|
||||
X32FIX = 's/\#define OPENSSL_CPUID_OBJ$$//;\
|
||||
s/RC4_CHUNK unsigned long$$/RC4_CHUNK unsigned long long/;\
|
||||
s/define SIXTY_FOUR_BIT_LONG$$/undef SIXTY_FOUR_BIT_LONG/;\
|
||||
s/undef SIXTY_FOUR_BIT$$/define SIXTY_FOUR_BIT/;'
|
||||
|
||||
MACFIX ='s/define RC4_INT unsigned char$$/define RC4_INT unsigned int/;'
|
||||
|
||||
WINFIX = 'if(/ifndef OPENSSL_DOING_MAKEDEPEND$$/){\
|
||||
print "\n\#ifndef OPENSSL_NO_DYNAMIC_ENGINE\n";\
|
||||
print "\# define OPENSSL_NO_DYNAMIC_ENGINE\n";\
|
||||
print "\#endif\n";\
|
||||
print "\#ifndef OPENSSL_NO_CAPIENG\n";\
|
||||
print "\# define OPENSSL_NO_CAPIENG\n";\
|
||||
print "\#endif\n\n";}'
|
||||
|
||||
PHONY = all clean backup restore
|
||||
.PHONY: $(PHONY)
|
||||
|
||||
all: backup $(ARCHS) linux-x32 cleanconf fixdarwin64 fixwin restore
|
||||
all: backup $(ARCHS) cleanconf fixdarwin64 restore
|
||||
|
||||
$(ARCHS):
|
||||
cd ../openssl; $(PERL) $(CONFIGURE) $(COPT) $@ > /dev/null
|
||||
$(PERL) -p -e $(CPUIDFIX) $(SRC_CFG) > ./archs/$@/$(CFG)
|
||||
|
||||
# linux-x32 was made by comparing define values of opensslconf.h which
|
||||
# was generated `Configure linux-x32' in openssl-1.0.2a
|
||||
linux-x32:
|
||||
cd ../openssl; $(PERL) $(CONFIGURE) $(COPT) linux-x86_64 > /dev/null;
|
||||
$(PERL) -p -e $(X32FIX) $(SRC_CFG) > ./archs/$@/$(CFG)
|
||||
|
||||
# The current openssl release does not use RC4 asm since it explicitly
|
||||
# specified as `$asm=~s/rc4\-[^:]+//;` in
|
||||
# https://github.com/openssl/openssl/blob/OpenSSL_1_0_1-stable/Configure#L584
|
||||
@@ -53,14 +34,6 @@ linux-x32:
|
||||
fixdarwin64:
|
||||
$(PERL) -pi -e $(MACFIX) ./archs/darwin64-x86_64-cc/$(CFG)
|
||||
|
||||
|
||||
# OPENSSL_NO_DYNAMIC_ENGINE is needed for building static
|
||||
# library. OPENSSL_NO_CAPIENG is needed to avoid build errors on
|
||||
# Win. See the comments in `deps/openssl/openssl/engines/e_capi.c` for
|
||||
# detail.
|
||||
fixwin:
|
||||
$(PERL) -pi -e $(WINFIX) ./archs/VC-WIN32/$(CFG) ./archs/VC-WIN64A/$(CFG)
|
||||
|
||||
# backup files to avoid to be overwritten
|
||||
backup:
|
||||
@for f in $(BACKUP_FILES); do \
|
||||
|
||||
6
deps/openssl/config/opensslconf.h
vendored
6
deps/openssl/config/opensslconf.h
vendored
@@ -19,10 +19,10 @@
|
||||
| --dest-os | --dest-cpu | OpenSSL target arch | CI |
|
||||
| --------- | ---------- | -------------------- | --- |
|
||||
| linux | ia32 | linux-elf | o |
|
||||
| linux | x32 | patched linux-x86_64 | - |
|
||||
| linux | x32 | linux-x32 | - |
|
||||
| linux | x64 | linux-x86_64 | o |
|
||||
| linux | arm | linux-armv4 | o |
|
||||
| linux | arm64 | N/A | - |
|
||||
| linux | arm64 | linux-aarch64 | o |
|
||||
| mac | ia32 | darwin-i386-cc | o |
|
||||
| mac | x64 | darwin64-x86-cc | o |
|
||||
| win | ia32 | VC-WIN32 | - |
|
||||
@@ -90,7 +90,7 @@
|
||||
#elif defined(OPENSSL_LINUX) && defined(__arm__)
|
||||
# include "./archs/linux-armv4/opensslconf.h"
|
||||
#elif defined(OPENSSL_LINUX) && defined(__aarch64__)
|
||||
/* Not Supported Yet */
|
||||
# include "./archs/linux-aarch64/opensslconf.h"
|
||||
#elif defined(__APPLE__) && defined(__MACH__) && defined(__i386__)
|
||||
# include "./archs/darwin-i386-cc/opensslconf.h"
|
||||
#elif defined(__APPLE__) && defined(__MACH__) && defined(__x86_64__)
|
||||
|
||||
Reference in New Issue
Block a user