riscv: fix riscv64 unrecognized opcode build error
[platform/kernel/linux-starfive.git] / arch / riscv / Makefile
index 0d13b59..9551509 100644 (file)
@@ -51,6 +51,7 @@ endif
 riscv-march-$(CONFIG_ARCH_RV32I)       := rv32ima
 riscv-march-$(CONFIG_ARCH_RV64I)       := rv64ima
 riscv-march-$(CONFIG_FPU)              := $(riscv-march-y)fd
+riscv-march-y                          := $(subst imafd,g,$(riscv-march-y))
 riscv-march-$(CONFIG_RISCV_ISA_C)      := $(riscv-march-y)c
 
 # Newer binutils versions default to ISA spec version 20191213 which moves some