During building with tizen gcc, the below message is displayed.
[ 13s] /home/abuild/rpmbuild/BUILD/opensbi-1.2/lib/sbi/sbi_tlb.c: Assembler messages:
[ 13s] /home/abuild/rpmbuild/BUILD/opensbi-1.2/lib/sbi/sbi_tlb.c:190: Error: unrecognized opcode `fence.i', extension `zifencei' required
[ 13s] make: *** [Makefile:503: /home/abuild/rpmbuild/BUILD/opensbi-1.2/build/lib/sbi/sbi_tlb.o] Error 1
This is same problem with linux-starfive and u-boot.
- not supported extension isa.
This patch will be abandoned when tizen gcc will be upper than GCC11.1.
Change-Id: Id307dd782ae5bf62e4797af27fca46baf15b8557
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
ifeq ($(CC_SUPPORT_SAVE_RESTORE),y)
CFLAGS += -mno-save-restore
endif
-CFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA)
+CFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=${subst imafd,g,$(PLATFORM_RISCV_ISA)}
CFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL)
CFLAGS += $(RELAX_FLAG)
CFLAGS += $(GENFLAGS)
ifeq ($(CC_SUPPORT_SAVE_RESTORE),y)
ASFLAGS += -mno-save-restore
endif
-ASFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA)
+ASFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=${subst imafd,g,$(PLATFORM_RISCV_ISA)}
ASFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL)
ASFLAGS += $(RELAX_FLAG)
ifneq ($(CC_IS_CLANG),y)