Skip to content

powerpc: Clang build fixes

Joel Stanley linuxppc-dev 2 versions – Applied

Status from this message: Applied to powerpc next, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 20 repliesApplied
  2. v12 patches 2 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5powerpc/Makefiles: Fix clang/llvm buildarch/powerpc/Makefile+1 -12 replies
2/5powerpc/boot: Fix crt0.S syntax for clangarch/powerpc/boot/crt0.S+2 -25 replies
3/5powerpc/boot: Ensure _zimage_start is a weak symbolarch/powerpc/boot/crt0.S+3 -12 replies
4/5powerpc: Fix duplicate const clang warning in user access codearch/powerpc/include/asm/uaccess.h+3 -35 replies
5/5powerpc: Remove -mno-sched-epilogarch/powerpc/Makefile arch/powerpc/kernel/Makefile arch/powerpc/kernel/trace/Makefile +2 more+7 -126 replies

Reviews trailers per patch

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

PatchNick Desaulniers
1/5
2/5R-b
3/5R-b
4/5R-b
5/5

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

Read the v2 thread

Cover letter [PATCH v2 0/5] powerpc: Clang build fixes

v2 rolls up all of the fixes I have into the one series, and adds a few more fixes.

With a one patch[1] on top of clang master I can build and boot a powernv kernel. Note that we can't build altivec code using clang yet[2], hence disabling MD_RAID456.

$ make ARCH=powerpc powernv_defconfig
$ ./scripts/config -d BTRFS_FS -d MD_RAID456
$ make CC=clang-8 CLANG_TRIPLE=powerpc64le-linux-gnu -j128

The build is very noisy as the ftrace recordmcount build step is not picking up -Qunused-arguments.

$ qemu-system-ppc64 -M powernv -m 3G -nographic -kernel zImage.epapr \
 -L ~/skiboot/ -initrd ~/rootfs.cpio.xz

Linux version 4.19.0-rc3-00005-g7f51dcdecc6b (joel@ozrom3) (clang version 8.0.0 (trunk 342199)) #5 SMP Fri Sep 14 13:28:57 ACST 2018

I have discovered Nick D's clangBuiltLinux issue tracker[3] and will be updating that as we find and fix issues.

[1] https://reviews.llvm.org/D50965
[2] https://bugs.llvm.org/show_bug.cgi?id=38887
[3] https://github.com/clangBuiltLinux/linux/issues

Anton Blanchard (2):
powerpc/Makefiles: Fix clang/llvm build
powerpc: Fix duplicate const clang warning in user access code

Joel Stanley (3):
powerpc/boot: Fix crt0.S syntax for clang powerpc/boot: Ensure _zimage_start is a weak symbol
powerpc: Remove -mno-sched-epilog

 arch/powerpc/Makefile                    | 7 +------
 arch/powerpc/boot/crt0.S                 | 8 +++++---
 arch/powerpc/include/asm/uaccess.h       | 6 +++---
 arch/powerpc/kernel/Makefile             | 8 ++++----
 arch/powerpc/kernel/trace/Makefile       | 2 +-
 arch/powerpc/platforms/powermac/Makefile | 2 +-
 arch/powerpc/xmon/Makefile               | 2 +-
 7 files changed, 16 insertions(+), 19 deletions(-)
Signature · 1 line
2.17.1