Skip to content

Commit 8381132

Browse files
luyahantargos
authored andcommitted
build: add riscv into host_arch_cc
PR-URL: #39004 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 63b6084 commit 8381132

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: configure.py

+7
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,7 @@ def host_arch_cc():
10661066
'__PPC__' : 'ppc64',
10671067
'__x86_64__' : 'x64',
10681068
'__s390x__' : 's390x',
1069+
'__riscv' : 'riscv',
10691070
}
10701071

10711072
rtn = 'ia32' # default
@@ -1078,6 +1079,12 @@ def host_arch_cc():
10781079
if rtn == 'mipsel' and '_LP64' in k:
10791080
rtn = 'mips64el'
10801081

1082+
if rtn == 'riscv':
1083+
if k['__riscv_xlen'] == '64':
1084+
rtn = 'riscv64'
1085+
else:
1086+
rtn = 'riscv32'
1087+
10811088
return rtn
10821089

10831090

0 commit comments

Comments
 (0)