Skip to content

build: require --openssl-no-asm if no suitable assembler

Also includes a refactor to extract error(), like warn() and make the messages a bit more consistent.

The main behaviour change here is to fail ./configure if you don't have an assembler new enough, which forces you to supply --openssl-no-asm rather than doing it implicitly. The cost of no-asm is that you get binaries that are potentially a lot slower, it's not something you should walk blindly in to. Discussion around this is primarily in https://github.com/nodejs/node/issues/19944

I'd really like to get this in to Node 10.0.0 so we don't have to argue about the semver-major nature of this. I know it's very late but I'd been assuming this was already done since we talked about it. All of these versions are pretty low (e.g. gcc 4.9 comes with binutils 2.25 and we're asking for 2.23), so aside from Windows (where we have it opt-in via vcbuild.bat already) and some of the exotics, I don't believe many (or any?) would be experiencing this since they already need a fairly modern toolchain for the C++ features we're now needing to support.

When we go to OpenSSL 1.1.1 these minimums are going to rise, but, it's my understanding that OpenSSL will only use the maximum that it has so the fall-back isn't as painful and we'll just need to provide a warning that you have suboptimal (but not terrible) binaries. I don't fully understand the $avx conditionals in the OpenSSL code and need @shigeki @bnoordhuis or someone else to help me with this. If this isn't the case then we're in a bit of trouble because gas gets bumped to 2.26 (or maybe even 3.0) and we might need to consider doing it right now!

This PR fails on AIX, we're going to have to put --openssl-no-asm for Node 10+ there until we get a newer assembler.

@shigeki @bnoordhuis @danbev @jasnell @nodejs/build

Merge request reports

Loading