]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/5.10.215/powerpc-xor_vmx-add-mhard-float-to-cflags.patch
Linux 5.10.215
[thirdparty/kernel/stable-queue.git] / releases / 5.10.215 / powerpc-xor_vmx-add-mhard-float-to-cflags.patch
1 From c6cb80d94871cbb4ff151f7eb2586cadeb364ef7 Mon Sep 17 00:00:00 2001
2 From: Nathan Chancellor <nathan@kernel.org>
3 Date: Sat, 27 Jan 2024 11:07:43 -0700
4 Subject: powerpc: xor_vmx: Add '-mhard-float' to CFLAGS
5
6 From: Nathan Chancellor <nathan@kernel.org>
7
8 commit 35f20786c481d5ced9283ff42de5c69b65e5ed13 upstream.
9
10 arch/powerpc/lib/xor_vmx.o is built with '-msoft-float' (from the main
11 powerpc Makefile) and '-maltivec' (from its CFLAGS), which causes an
12 error when building with clang after a recent change in main:
13
14 error: option '-msoft-float' cannot be specified with '-maltivec'
15 make[6]: *** [scripts/Makefile.build:243: arch/powerpc/lib/xor_vmx.o] Error 1
16
17 Explicitly add '-mhard-float' before '-maltivec' in xor_vmx.o's CFLAGS
18 to override the previous inclusion of '-msoft-float' (as the last option
19 wins), which matches how other areas of the kernel use '-maltivec', such
20 as AMDGPU.
21
22 Cc: stable@vger.kernel.org
23 Closes: https://github.com/ClangBuiltLinux/linux/issues/1986
24 Link: https://github.com/llvm/llvm-project/commit/4792f912b232141ecba4cbae538873be3c28556c
25 Signed-off-by: Nathan Chancellor <nathan@kernel.org>
26 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
27 Link: https://msgid.link/20240127-ppc-xor_vmx-drop-msoft-float-v1-1-f24140e81376@kernel.org
28 [nathan: Fixed conflicts due to lack of 04e85bbf71c9 in older trees]
29 Signed-off-by: Nathan Chancellor <nathan@kernel.org>
30 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 ---
32 arch/powerpc/lib/Makefile | 2 +-
33 1 file changed, 1 insertion(+), 1 deletion(-)
34
35 --- a/arch/powerpc/lib/Makefile
36 +++ b/arch/powerpc/lib/Makefile
37 @@ -67,6 +67,6 @@ obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
38 obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
39
40 obj-$(CONFIG_ALTIVEC) += xor_vmx.o xor_vmx_glue.o
41 -CFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
42 +CFLAGS_xor_vmx.o += -mhard-float -maltivec $(call cc-option,-mabi=altivec)
43
44 obj-$(CONFIG_PPC64) += $(obj64-y)