Skip to content

Commit fcbd057

Browse files
committed
build: fix version checks in configure.py
Fixes: #29927 Refs: #29931 PR-URL: #29965 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 9383e3b commit fcbd057

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

configure.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import subprocess
1313
import shutil
1414
from distutils.spawn import find_executable as which
15+
from distutils.version import StrictVersion
1516

1617
# If not run from node/, cd to node/.
1718
os.chdir(os.path.dirname(__file__) or '.')
@@ -1229,10 +1230,10 @@ def without_ssl_error(option):
12291230
# supported asm compiler for AVX2. See https://github.com/openssl/openssl/
12301231
# blob/OpenSSL_1_1_0-stable/crypto/modes/asm/aesni-gcm-x86_64.pl#L52-L69
12311232
openssl110_asm_supported = \
1232-
('gas_version' in variables and float(variables['gas_version']) >= 2.23) or \
1233-
('xcode_version' in variables and float(variables['xcode_version']) >= 5.0) or \
1234-
('llvm_version' in variables and float(variables['llvm_version']) >= 3.3) or \
1235-
('nasm_version' in variables and float(variables['nasm_version']) >= 2.10)
1233+
('gas_version' in variables and StrictVersion(variables['gas_version']) >= StrictVersion('2.23')) or \
1234+
('xcode_version' in variables and StrictVersion(variables['xcode_version']) >= StrictVersion('5.0')) or \
1235+
('llvm_version' in variables and StrictVersion(variables['llvm_version']) >= StrictVersion('3.3')) or \
1236+
('nasm_version' in variables and StrictVersion(variables['nasm_version']) >= StrictVersion('2.10'))
12361237

12371238
if is_x86 and not openssl110_asm_supported:
12381239
error('''Did not find a new enough assembler, install one or build with

0 commit comments

Comments
 (0)