To support Clang's CFI we need LTO. For LTO, we need to be able to compile with the LLVM integrated assembler.
Currently, we can't. This series gets us a bit closer, but I'm still stuck and I'm hoping someone can point me in the right direction. Patch 1 is a fix that can be merged at any time. The rest of this series is pretty rough, but with it, building like this: make CC=clang-11 LD=ld.lld-11 AR=llvm-ar-11 NM=llvm-nm-11 STRIP=llvm-strip-11 \ OBJCOPY=llvm-objcopy-11 OBJDUMP=llvm-objdump-11 READELF=llvm-readelf-11 \ HOSTCC=clang-11 HOSTCXX=clang++-11 HOSTAR=llvm-ar-11 HOSTLD=ld.lld-11 \ LLVM_IAS=1 vmlinux on a pseries_le_defconfig without Werror works except for head-64.S, which still fails as described in the final patch. Help would be appreciated because it's deep magic all around. Apart from the very very dodgy change to drop the tlbiel feature section, none of the de-gas-ing changed the compiled binary for me under gcc-10.2.0-13ubuntu1. Daniel Axtens (8): powerpc/64s/exception: Clean up a missed SRR specifier powerpc: check for support for -Wa,-m{power4,any} powerpc/head-64: do less gas-specific stuff with sections powerpc/ppc_asm: use plain numbers for registers poweprc/lib/quad: Provide macros for lq/stq powerpc/mm/book3s64/hash: drop pre 2.06 tlbiel for clang powerpc/purgatory: drop .machine specifier powerpc/64/asm: don't reassign labels arch/powerpc/Makefile | 4 +- arch/powerpc/include/asm/head-64.h | 20 ++++---- arch/powerpc/include/asm/ppc-opcode.h | 4 ++ arch/powerpc/include/asm/ppc_asm.h | 64 +++++++++++++------------- arch/powerpc/kernel/exceptions-64s.S | 33 ++++++------- arch/powerpc/kernel/head_64.S | 16 +++---- arch/powerpc/lib/quad.S | 4 +- arch/powerpc/mm/book3s64/hash_native.c | 10 ++++ arch/powerpc/purgatory/trampoline_64.S | 2 +- 9 files changed, 86 insertions(+), 71 deletions(-) -- 2.27.0