Skip to content

Support cross compiling with clang

Andrew Jones kvm kvm-riscv kvmarm linux-s390 linuxppc-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 1 replyIn review
  2. v24 patches 8 repliesSuperseded
  3. v13 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- Add README patch for cross-compiling, clang, and cross-clang [Nick]
- Add comment to the commenting-out of mstrict-align [Nick]
- Add the reason to ignore warnings vs. fix code to commit message of patch2
- Picked up Nick's tags

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5riscv: Drop mstrict-alignriscv/Makefile+3 -10 replies
2/5Makefile: Prepare for clang EFI buildsMakefile+2 -00 replies
3/5configure: Support cross compiling with clangconfigure+8 -30 replies
4/5riscv: gitlab-ci: Add clang build tests.gitlab-ci.yml+43 -00 replies
5/5README: Add cross and clang recipesREADME.md+22 -00 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchThomas HuthNicholas Piggin
1/5R-b
2/5R-b
3/5R-b R-b
4/5A-b A-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [kvm-unit-tests PATCH v3 0/5] Support cross compiling with clang

Modify configure to allow --cc=clang and a cross-prefix to be specified together (as well as --cflags). This allows compiling with clang, but using cross binutils for everything else, including the linker. So far tested on riscv 32- and 64-bit and aarch64 (with some hacks to the code to get it to compile - which is why there's no gitlab-ci patch for aarch64 in this series). I suspect it should work for other architectures too.

v3:
- Add README patch for cross-compiling, clang, and cross-clang [Nick]
- Add comment to the commenting-out of mstrict-align [Nick]
- Add the reason to ignore warnings vs. fix code to commit message of patch2
- Picked up Nick's tags
v2:
- fix building with clang and --config-efi by suppressing a warning
- added riscv clang efi build to CI
- picked up Thomas's tags

Andrew Jones (5):
riscv: Drop mstrict-align
Makefile: Prepare for clang EFI builds
configure: Support cross compiling with clang
riscv: gitlab-ci: Add clang build tests
README: Add cross and clang recipes

 .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++++++++++++++++
 Makefile       |  2 ++
 README.md      | 22 ++++++++++++++++++++++
 configure      | 11 ++++++++---
 riscv/Makefile |  4 +++-
 5 files changed, 78 insertions(+), 4 deletions(-)
Signature · 1 line
2.46.0