Clang compatibility improvements for RISC-V
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | Makefile: Strip leading spaces when preprocessing generated_defconfigscripts/ | +1 | 7 replies | |
| 2/2 | riscv: Access gd with inline assembly when building with LTO or Clangarch/ arch/ common/ +1 more | +33 | 1 reply |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Leo Yu-Chi Liang |
|---|---|
| 1/2 | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] Clang compatibility improvements for RISC-V
Originally reported by Nathaniel Hourt[1], U-Boot fails to boot on JH7110 platforms (starfive_visionfive2_defconfig) when building with Clang.
This series fixes configuration generation with Clang's preprocessor and add an alternative codepath for RISC-V to access gd to workaround misoptimization of Clang, which is sufficient for building images for JH7110 boards.
Tested with
- starfive_visionfive2_defconfig
- qemu-riscv64_smode_defconfig
- sifive_unleashed_defconfig
built with either GCC 14 or LLVM 19.
Note that images built with LLVM lld are still broken and binutils ld has to be used for now. To test the changes on JH7110 platforms, this patch[2] must be applied for SPL to function.
[1]: https://lore.kernel.org/u-boot/[email protected]/
[2]: https://lore.kernel.org/all/[email protected]/
Yao Zi (2):
Makefile: Strip leading spaces when preprocessing generated_defconfig
riscv: Access gd with inline assembly when building with LTO or Clang
arch/riscv/cpu/cpu.c | 6 ++++++ arch/riscv/include/asm/global_data.h | 19 +++++++++++++++++++ common/board_r.c | 4 +++- common/init/board_init.c | 7 +++++-- scripts/kconfig/Makefile | 1 + 5 files changed, 34 insertions(+), 3 deletions(-)
Signature · 1 line
2.49.0