Skip to content

Commit

Permalink
Add riscv into host_arch_cc
Browse files Browse the repository at this point in the history
  • Loading branch information
luyahan committed Jun 11, 2021
1 parent 240c8bc commit 9b956c5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bash_riscv64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export CC=riscv64-unknown-linux-gnu-gcc
export CXX=riscv64-unknown-linux-gnu-g++
export CC_host=clang
export CXX_host=clang++


./configure --cross-compiling --dest-cpu=riscv64 --verbose --without-ssl
7 changes: 7 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,7 @@ def host_arch_cc():
'__PPC__' : 'ppc64',
'__x86_64__' : 'x64',
'__s390x__' : 's390x',
'__riscv' : 'riscv'
}

rtn = 'ia32' # default
Expand All @@ -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


Expand Down

0 comments on commit 9b956c5

Please sign in to comment.