Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add riscv into host_arch_cc
  • Loading branch information
luyahan committed Jun 11, 2021
commit 9b956c53132016daa96e5472bf16b92cc5e30e59
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