-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build and test riscv32 #700
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #700 +/- ##
=======================================
Coverage 97.60% 97.60%
=======================================
Files 94 94
Lines 8644 8644
=======================================
Hits 8437 8437
Misses 207 207
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
||
set(RISCV /usr/local/riscv) | ||
|
||
set(CMAKE_SYSTEM_PROCESSOR riscv32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we specify the riscv32imac triple?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value is only informational, but you can modify the compiler flags.
By default it builds as rv32imafdc
. If we switch to rv32imac
it will not build because the included glibc is not compatible (the ABI for floating-point values is different). We can configure and build the toolchain ourselves but seems to be a lot of work for the start.
b6b1fe0
to
52c710e
Compare
Use CMake target name directly in add_test() to make it work with `CROSSCOMPILING_EMULATOR`.
This uses a pre-built RISC-V toolchain to build and test evmone.
This compiles evmone and dependencies to
rv32imafdc
withilp32d
ABI. I.e. this target has hardware support for floating point.Our preference would be to compile for
rv32imac
withilp32
ABI. However, there are some obstacles to get there:ilp32d
. We would need to build the toolchain ourselves.-march=rv32imac -mabi=ilp32d
. The compiler is not very happy about using architecture with incompatible ABI but it will proceed anyway. Unfortunately, the dependencies have some floating-point code so we also need to provide soft-float library. I was not able to make it build so far.