Skip to content

Commit ff64050

Browse files
committed
drm/amd/display: Fix dc dml march cause riscv build failed
We must carefully when remove the march substr. otherwise it will cause build failed when CONFIG_RISCV_V Which introduced in Link. Link: https://lore.kernel.org/lkml/mhng-3e4b97f6-8310-487e-9f9a-1d19d6e42a1e@palmer-ri-x1c9/ Log: CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.o riscv64-linux-gnu-gcc: error: ‘-march=r64imafdc_zicsr_zifencei_zihintpause’: ISA string must begin with rv32 or rv64 Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent b0f5ef9 commit ff64050

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

  • drivers/gpu/drm/amd/display/dc/dml

drivers/gpu/drm/amd/display/dc/dml/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ endif
4545

4646
ifdef CONFIG_RISCV
4747
include $(srctree)/arch/riscv/Makefile.isa
48-
ifdef CONFIG_RISCV_ISA_V
49-
# Remove V from the ISA string, like in arch/riscv/Makefile, but keep F and D.
50-
dml_ccflags := -march=$(subst v,,$(riscv-march-y))
51-
else
52-
dml_ccflags := -march=$(riscv-march-y)
53-
endif
48+
dml_ccflags := -march=$(shell echo $(riscv-march-y) | sed -E 's/(rv32ima|rv64ima)([^v_]*)v?/\1\2/')
5449
endif
5550

5651
ifdef CONFIG_CC_IS_GCC

0 commit comments

Comments
 (0)