summaryrefslogtreecommitdiff
path: root/arch/powerpc/Kconfig
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2023-04-26 15:58:39 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2023-04-26 16:21:33 +1000
commit169f8997968ab620d750d9a45e15c5288d498356 (patch)
tree8d1bb8c8c1bca78de830a0004d64be93bd9da227 /arch/powerpc/Kconfig
parent0c993300d52bf5ce9b951c3b6b25d0d14acc49a9 (diff)
powerpc/64s: Disable pcrel code model on Clang
Clang has a bug that casues the pcrel code model not to be used when any of -msoft-float, -mno-altivec, or -mno-vsx are set. Leaving these off causes FP/vector instructions to be generated, causing crashes. So disable pcrel for clang for now. Fixes: 7e3a68be42e10 ("powerpc/64: vmlinux support building with PCREL addresing") Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230426055848.402993-3-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/Kconfig')
-rw-r--r--arch/powerpc/Kconfig7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 7a0f25a09759..520e577f3106 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -8,7 +8,12 @@ config CC_HAS_PREFIXED
def_bool PPC64 && $(cc-option, -mcpu=power10 -mprefixed)
config CC_HAS_PCREL
- def_bool PPC64 && $(cc-option, -mcpu=power10 -mpcrel)
+ # Clang has a bug (https://github.com/llvm/llvm-project/issues/62372)
+ # where pcrel code is not generated if -msoft-float, -mno-altivec, or
+ # -mno-vsx options are also given. Without these options, fp/vec
+ # instructions are generated from regular kernel code. So Clang can't
+ # do pcrel yet.
+ def_bool PPC64 && CC_IS_GCC && $(cc-option, -mcpu=power10 -mpcrel)
config 32BIT
bool