linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] powerpc: Clang build fixes
@ 2018-09-10  8:57 Joel Stanley
  2018-09-10  8:57 ` [PATCH 1/2] powerpc/boot: Fix crt0.S syntax for clang Joel Stanley
  2018-09-10  8:57 ` [PATCH 2/2] powerpc/boot: Ensure _zimage_start is a weak symbol Joel Stanley
  0 siblings, 2 replies; 5+ messages in thread
From: Joel Stanley @ 2018-09-10  8:57 UTC (permalink / raw)
  To: linuxppc-dev, Anton Blanchard

Two fixes to get us closer to building with clang. With a one patch[1]
on top of clang master I can build and boot a powernv kernel:

$ make ARCH=powerpc powernv_defconfig
$ ./scripts/config -e PPC_DISABLE_WERROR -d FTRACE -d BTRFS_FS -d MD_RAID456
$ make CC=/scratch/joel/llvm-build/bin/clang-8 CLANG_TRIPLE=powerpc64le-linux-gnu -j128

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

Linux version 4.19.0-rc3-00003-g728b25f26bce (joel@ozrom3) (clang version 8.0.0 (trunk 341773)) #12 SMP Mon Sep 10 17:32:05 ACST 2018

The DISABLE_WERROR is due to clang's -Wduplicate-decl-specifier. Some
macros we have in arch/powerpc/include/asm/uaccess.h warn on 'const
typeof(var)', where as the GCC version doesn't. Anton did fix this a
while ago, but the fix was 'reverted' to resolve some sparse warnings.
I think we should re-apply Anton's patch[2].

[1] https://reviews.llvm.org/D50965
[2] http://git.kernel.org/torvalds/c/b91c1e3e7a6f22a6b898e345b745b6a43273c973

Joel Stanley (2):
  powerpc/boot: Fix crt0.S syntax for clang
  powerpc/boot: Ensure _zimage_start is a weak symbol

 arch/powerpc/boot/crt0.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-14  2:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-10  8:57 [PATCH 0/2] powerpc: Clang build fixes Joel Stanley
2018-09-10  8:57 ` [PATCH 1/2] powerpc/boot: Fix crt0.S syntax for clang Joel Stanley
2018-09-11 11:32   ` Segher Boessenkool
2018-09-14  2:55     ` Joel Stanley
2018-09-10  8:57 ` [PATCH 2/2] powerpc/boot: Ensure _zimage_start is a weak symbol Joel Stanley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).