From version 2.38, binutils default to ISA spec version 20191213. This means that the csr read/write (csrr/csrw) instructions and fence.i instruction has separated from the I extension, become two standalone extensions: Zicsr and Zifencei. As the kernel uses those instruction, this causes the following build failure:
From version 2.38, binutils default to ISA spec version 20191213. This means that the csr read/write (csrr/csrw) instructions and fence.i instruction has separated from the
I
extension, become two standalone extensions: Zicsr and Zifencei. As the kernel uses those instruction, this causes the following build failure:CC lib/sbi/sbi_tlb.o <>/lib/sbi/sbi_tlb.c: Assembler messages:
<>/lib/sbi/sbi_tlb.c:190: Error: unrecognized opcode `fence.i'
make: *** [src/common/opensbi/Makefile:431: <>/build/lib/sbi/sbi_tlb.o] Error 1
The fix is to specify those extensions explicitly in -march. However as older binutils version do not support this, we first need to detect that.
Reviewed-by: Bin Meng bmeng.cn@gmail.com Tested-by: Alexandre Ghiti alexandre.ghiti@canonical.com Reviewed-by: Anup Patel anup@brainfault.org