Add initial big-endian support#1812
Add initial big-endian support#1812aleksapaunovic-htec wants to merge 4 commits intoriscv-collab:masterfrom
Conversation
cmuellner
left a comment
There was a problem hiding this comment.
Thanks for providing this PR!
Besides the issue with the linux headers, I have two more comments:
- We should probaby add at least one CI/CD job to build a BE toolchain
- What is the status of the GCC testsuite when building a BE toolchain?
| #ifndef _ASM_RISCV_BYTEORDER_H | ||
| #define _ASM_RISCV_BYTEORDER_H | ||
|
|
||
| #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |
There was a problem hiding this comment.
All linux headers are copied without modification as we don't want downstream changes here.
If we add such non-upstream changes, then there is a risk of breaking the BE build each time we update the linux headers.
There was a problem hiding this comment.
In that case, I will be removing the commit for now. We will try upstreaming this in the future.
|
Hi Christoph,
Agreed!
A lot of the tests implicitly depend on RVV being supported in the compiler, generating a lot of noise when running tests. We have been going through the logs over the last few days, and this appears to be the major difference between BE and LE runs. Actually confirming and fixing this will probably take some time though. Thank you for taking the time to review this PR! |
GCC currently does not support the RISC-V Vector Extension on big-endian builds, which causes the stage1 self-tests to fail. Disabling them is a temporary fix, until we get RVV working on big-endian systems.
e01382e to
0017a75
Compare
|
Last week, we sent the v2 of the GCC patch series mentioned above. We tried solving the lack of RVV support and subsequent self-test failures by disabling self-tests within the GCC codebase. However, the maintainers prefer a workaround to disable self-tests in the config. Therefore, I added a commit that should address this issue. Also, we received a comment regarding our usage of gdb-sim for testing. Although we did manage to run the majority of non-RVV-related tests on gdb-sim, it seems that QEMU is the preferred tool for RISC-V testing. We will be focusing on that in the future. |
This series adds initial big-endian support:
--with-endianflag.rv64gcv-lp64dmultilib option when building the Linux toolchain.We are working on upstreaming GDB and GCC changes as well. The GDB changes are required for running big-endian tests, as QEMU currently has no big-endian support.