Enable compiling on RISC-V CPU (#2925)

This commit is contained in:
haurog 2024-12-11 10:32:15 +01:00 committed by GitHub
parent ac59b183fb
commit 29decdf265
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -102,6 +102,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-a14")
switch("passL", "-mcpu=apple-a14")
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")