Skip to content

Commit aacd19c

Browse files
ninolomatadanielRep
authored andcommitted
feat(clang): add support for riscv clang
This commit fixes relocation errors identified by the clang compiler and marks the .gtl_page_tables section as no data otherwise there is a type mismatch. Signed-off-by: Bruno Sa <[email protected]>
1 parent 2d0a0fc commit aacd19c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/arch/riscv/arch.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,5 @@ arch-ldflags = -m $(ld_emulation)
4444

4545
arch_mem_prot:=mmu
4646
PAGE_SIZE:=0x1000
47+
48+
clang_arch_target:=riscv64

src/arch/riscv/sbi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static struct sbiret sbi_time_handler(unsigned long fid)
222222
csrs_sie_set(SIE_STIE);
223223
}
224224

225-
return (struct sbiret){ SBI_SUCCESS };
225+
return (struct sbiret){ SBI_SUCCESS, 0 };
226226
}
227227

228228
static void sbi_timer_irq_handler()
@@ -255,7 +255,7 @@ static struct sbiret sbi_ipi_handler(unsigned long fid)
255255
}
256256
}
257257

258-
return (struct sbiret){ SBI_SUCCESS };
258+
return (struct sbiret){ SBI_SUCCESS, 0 };
259259
}
260260

261261
static struct sbiret sbi_base_handler(unsigned long fid)

0 commit comments

Comments
 (0)