Commit 578ec8d4 authored by Anton Blanchard's avatar Anton Blanchard Committed by Wen Zhiwei
Browse files

riscv: Fix toolchain vector detection

stable inclusion
from stable-v6.6.51
commit 8289dc916e9ef8b9bd1d8dc6b4ccaaa27c6ee7dc
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAYRVR

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8289dc916e9ef8b9bd1d8dc6b4ccaaa27c6ee7dc



--------------------------------

[ Upstream commit 5ba7a75a53dffbf727e842b5847859bb482ac4aa ]

A recent change to gcc flags rv64iv as no longer valid:

   cc1: sorry, unimplemented: Currently the 'V' implementation
   requires the 'M' extension

and as a result vector support is disabled. Fix this by adding m
to our toolchain vector detection code.

Signed-off-by: default avatarAnton Blanchard <antonb@tenstorrent.com>
Fixes: fa8e7cce ("riscv: Enable Vector code to be built")
Link: https://lore.kernel.org/r/20240819001131.1738806-1-antonb@tenstorrent.com


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent f456ad78
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -491,8 +491,8 @@ config RISCV_ISA_SVPBMT
config TOOLCHAIN_HAS_V
	bool
	default y
	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64iv)
	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32iv)
	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64imv)
	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32imv)
	depends on LLD_VERSION >= 140000 || LD_VERSION >= 23800
	depends on AS_HAS_OPTION_ARCH