Commit 05f21be8 authored by Richard Lau's avatar Richard Lau Committed by Node.js GitHub Bot
Browse files

build: fix `host_arch_cc()` for AIX/IBM i

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: default avatarDaniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: default avatarAsh Cripps <acripps@redhat.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
Reviewed-By: default avatarMichael Dawson <midawson@redhat.com>
parent d872aaf1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment