Enable RISC-V (rv64gc) compilation (#6439)

This commit is contained in:
haurog 2024-07-23 04:03:53 +02:00 committed by GitHub
parent b5c0b479fb
commit 5762ebc249
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -120,6 +120,11 @@ elif defined(macosx) and defined(arm64):
# Apple's Clang can't handle "-march=native" on M1: https://github.com/status-im/nimbus-eth2/issues/2758
switch("passC", "-mcpu=apple-m1")
switch("passL", "-mcpu=apple-m1")
elif defined(riscv64):
# riscv64 needs specification of ISA with extensions. 'gc' is widely supported
# and seems to be the minimum extensions needed to build.
switch("passC", "-march=rv64gc")
switch("passL", "-march=rv64gc")
else:
switch("passC", "-march=native")
switch("passL", "-march=native")