diff --git a/configure.py b/configure.py index 4bc790e2f24219..c3c06cb511b2c7 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