Skip to content

LLVM: make x86_64 kernel build with clang.

Michael Davidson linux-crypto linux-kbuild linux-raid lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 40 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7Makefile, LLVM: add -no-integrated-as to KBUILD_[AC]FLAGSMakefile+2 -02 replies
2/7Makefile, x86, LLVM: disable unsupported optimization flagsMakefile arch/x86/Makefile+4 -06 replies
3/7x86, LLVM: suppress clang warnings about unaligned accessesarch/x86/Makefile+5 -06 replies
4/7x86, boot, LLVM: #undef memcpy etc in string.carch/x86/boot/string.c+9 -03 replies
5/7x86, boot, LLVM: Use regparm=0 for memcpy and memsetarch/x86/boot/copy.S arch/x86/boot/string.h+26 -22 replies
6/7md/raid10, LLVM: get rid of variable length arraydrivers/md/raid10.c+4 -519 replies
7/7crypto, x86, LLVM: aesni - fix token pastingarch/x86/crypto/aes_ctrby8_avx-x86_64.S+2 -51 reply

Reviews trailers per patch

1 of 7 patches has a Reviewed-by or Acked-by.

PatchH. Peter Anvin
1/7
2/7
3/7
4/7A-b
5/7
6/7
7/7

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

Read the v1 thread

Cover letter [PATCH 0/7] LLVM: make x86_64 kernel build with clang.

This patch set is sufficient to get the x86_64 kernel to build and boot correctly with clang-3.8 or greater.

The resulting build still has about 300 warnings, very few of which appear to be significant. Most of them should be fixable with some minor code refactoring although a few of them, such as the complaints about implict conversions between enumerated types may be candidates for just being disabled.

Michael Davidson (7):
Makefile, LLVM: add -no-integrated-as to KBUILD_[AC]FLAGS Makefile, x86, LLVM: disable unsupported optimization flags x86, LLVM: suppress clang warnings about unaligned accesses x86, boot, LLVM: #undef memcpy etc in string.c x86, boot, LLVM: Use regparm=0 for memcpy and memset md/raid10, LLVM: get rid of variable length array crypto, x86, LLVM: aesni - fix token pasting

 Makefile                                |  4 ++++
 arch/x86/Makefile                       |  7 +++++++
 arch/x86/boot/copy.S                    | 15 +++++++++++++--
 arch/x86/boot/string.c                  |  9 +++++++++
 arch/x86/boot/string.h                  | 13 +++++++++++++
 arch/x86/crypto/aes_ctrby8_avx-x86_64.S |  7 ++-----
 drivers/md/raid10.c                     |  9 ++++-----
 7 files changed, 52 insertions(+), 12 deletions(-)
Signature · 1 line
2.12.0.367.g23dc2f6d3c-goog