Skip to content

Commit f299404

Browse files
nathanchancegregkh
authored andcommitted
powerpc: xor_vmx: Add '-mhard-float' to CFLAGS
[ Upstream commit 35f2078 ] arch/powerpc/lib/xor_vmx.o is built with '-msoft-float' (from the main powerpc Makefile) and '-maltivec' (from its CFLAGS), which causes an error when building with clang after a recent change in main: error: option '-msoft-float' cannot be specified with '-maltivec' make[6]: *** [scripts/Makefile.build:243: arch/powerpc/lib/xor_vmx.o] Error 1 Explicitly add '-mhard-float' before '-maltivec' in xor_vmx.o's CFLAGS to override the previous inclusion of '-msoft-float' (as the last option wins), which matches how other areas of the kernel use '-maltivec', such as AMDGPU. Cc: stable@vger.kernel.org Closes: ClangBuiltLinux#1986 Link: llvm/llvm-project@4792f91 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240127-ppc-xor_vmx-drop-msoft-float-v1-1-f24140e81376@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent aab8a07 commit f299404

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/lib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
7272
obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
7373

7474
obj-$(CONFIG_ALTIVEC) += xor_vmx.o xor_vmx_glue.o
75-
CFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
75+
CFLAGS_xor_vmx.o += -mhard-float -maltivec $(call cc-option,-mabi=altivec)
7676
# Enable <altivec.h>
7777
CFLAGS_xor_vmx.o += -isystem $(shell $(CC) -print-file-name=include)
7878

0 commit comments

Comments
 (0)