deps: rewrite openssl x86asm.pl win32 workaround #60510
Open
+3,127
−3,093
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The win32 builds have been using a workaround for building the openssl dependency. This breaks building x86 assembler files for unsupported architectures (32-bit linux-elf etc).
These git commits aim to solve the situation in a more inclusive way by adding an if statement to the perl script
x86asm.plthat is used to create the assembler files. This way, win32 builds still get assembler files with%ifdefsyntax, which is how Node has been building them so far. Official OpenSSL has#ifdefand not%ifdefinx86asm.pl.There are actually only 2 necessary modifications:
tools/dep_updaters/update-openssl.sh- a perl line to rewritex86asm.plendbranch subroutine, not only#ifdefto%ifdefdoc/contributing/maintaining/maintaining-openssl.mdabout how to changex86asm.plOther changes in this pull request happen automatically after running
tools/dep_updaters/update-openssl.sh regenerate:deps/openssl/openssl/crypto/perlasm/x86asm.pl- changed directly from the update script%ifdefto#ifdefmodificationbuildinf.hfiles only see aDATEchangeconfigdata.pmfiles only see aRANLIBchangeThe
.Sfiles that openssl creates are supposed to go through the C preprocessor before using the assembler, andcppdoesn't understand the%ifdefsyntax, it needs#ifdef. Although 32-bit Linux is no longer supported, people still build for x86 linux (and maybe other x86) and the workaround for building for linux-elf has been so far to revert the%ifdefsyntax back to original (openssl source)#ifdef.In any case, if this pull request gets rejected, after Node drops support for all win32 releases, there will be no need to keep the ifdef modification, and after that, node openssl dependency will be building again for linux x86.
References: