From 0a40a1133d1102242ed7ee8d01ab1cda0f9659ad Mon Sep 17 00:00:00 2001 From: Matheus Marchini Date: Fri, 3 Nov 2017 22:57:18 -0200 Subject: [PATCH] build: fix bsd build with gcc BSD build with GCC was broken because it was checking for the llvm_version variable on common.gypi, even though llvm wasn't installed (or needed). PR-URL: https://github.com/nodejs/node/pull/16737 Fixes: https://github.com/nodejs/node/issues/16257 Reviewed-By: Ben Noordhuis Reviewed-By: Gibson Fahnestock Reviewed-By: James M Snell Reviewed-By: Jon Moss Reviewed-By: Refael Ackermann --- common.gypi | 2 +- configure | 3 +-- deps/openssl/openssl.gyp | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/common.gypi b/common.gypi index 0ff4779ebb8c98..b8e7ba833814c6 100644 --- a/common.gypi +++ b/common.gypi @@ -418,7 +418,7 @@ }], ['OS=="freebsd"', { 'conditions': [ - ['llvm_version < "4.0"', { + ['"0" < llvm_version < "4.0"', { # Use this flag because on FreeBSD std::pairs copy constructor is non-trivial. # Doesn't apply to llvm 4.0 (FreeBSD 11.1) or later. # Refs: https://lists.freebsd.org/pipermail/freebsd-toolchain/2016-March/002094.html diff --git a/configure b/configure index 3b6fc7347db22a..13dcb601d09e32 100755 --- a/configure +++ b/configure @@ -692,8 +692,7 @@ def check_compiler(o): # to a version that is not completely ancient. warn('C compiler too old, need gcc 4.2 or clang 3.2 (CC=%s)' % CC) - if is_clang: - o['variables']['llvm_version'] = get_llvm_version(CC) + o['variables']['llvm_version'] = get_llvm_version(CC) if is_clang else 0 # Need xcode_version or gas_version when openssl asm files are compiled. if options.without_ssl or options.openssl_no_asm or options.shared_openssl: diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp index ae5c980e06a5ab..88994a12b22097 100644 --- a/deps/openssl/openssl.gyp +++ b/deps/openssl/openssl.gyp @@ -7,7 +7,6 @@ 'is_clang': 0, 'gcc_version': 0, 'openssl_no_asm%': 0, - 'llvm_version%': 0, 'xcode_version%': 0, 'gas_version%': 0, 'openssl_fips%': 'false',