From 1d638976d5a167ff1e0f938e3eced06553e1f758 Mon Sep 17 00:00:00 2001 From: Lu Yahan Date: Fri, 11 Jun 2021 16:09:30 +0800 Subject: [PATCH] build: add riscv into host_arch_cc PR-URL: https://github.com/nodejs/node/pull/39004 Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Michael Dawson --- configure.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.py b/configure.py index 4bc790e2f24..d69c52521d8 100755 --- a/configure.py +++ b/configure.py @@ -1066,6 +1066,7 @@ def host_arch_cc(): '__PPC__' : 'ppc64', '__x86_64__' : 'x64', '__s390x__' : 's390x', + '__riscv' : 'riscv', } rtn = 'ia32' # default @@ -1078,6 +1079,12 @@ def host_arch_cc(): if rtn == 'mipsel' and '_LP64' in k: rtn = 'mips64el' + if rtn == 'riscv': + if k['__riscv_xlen'] == '64': + rtn = 'riscv64' + else: + rtn = 'riscv32' + return rtn