From 719f1563c191cda997cf181766ce4e84255918a8 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Wed, 21 Jul 2021 20:49:48 -0400 Subject: [PATCH] build: fix `host_arch_cc()` for AIX/IBM i MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The AIX/IBM i branch in `host_arch_cc()` that hardcodes the compiler executable to `gcc` precludes picking up either `CC_host` or `CC` environment variables (if set) as is done on other platforms. On an AIX/IBM i platform where the compiler is, e.g. `gcc-10` instead of just `gcc`, the current check will fail to detect the host architecture and incorrectly default to `ia32`. Removing the AIX/IBM i specific branch will follow the same logic as on the other platforms: 1. The value, if set, of the `CC_host` environment variable. 2. Otherwise, if set, the value of the `CC` environment variable. 3. `gcc` (`cc` if on macOS). PR-URL: https://github.com/nodejs/node/pull/39481 Reviewed-By: Daniel Bevenius Reviewed-By: Ash Cripps Reviewed-By: Anna Henningsen Reviewed-By: Tobias Nießen Reviewed-By: Michael Dawson --- configure.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/configure.py b/configure.py index 3be42d496f2453..14c75028668aad 100755 --- a/configure.py +++ b/configure.py @@ -964,12 +964,7 @@ def is_arm_hard_float_abi(): def host_arch_cc(): """Host architecture check using the CC command.""" - if sys.platform.startswith('aix'): - # we only support gcc at this point and the default on AIX - # would be xlc so hard code gcc - k = cc_macros('gcc') - else: - k = cc_macros(os.environ.get('CC_host')) + k = cc_macros(os.environ.get('CC_host')) matchup = { '__aarch64__' : 'arm64',