[binaries]
c = 'clang'
c_ld = '/usr/bin/riscv64-unknown-elf-ld'
ar = 'riscv64-unknown-elf-ar'
as = 'riscv64-unknown-elf-as'
nm = 'riscv64-unknown-elf-nm'
strip = 'riscv64-unknown-elf-strip'
exe_wrapper = ['sh', '-c', 'test -z "$MESON_SOURCE_ROOT" || "$MESON_SOURCE_ROOT"/scripts/run-rv32imafdc "$@"', 'run-rv32imafdc']

[host_machine]
system = 'none'
cpu_family = 'riscv'
cpu = 'riscv'
endian = 'little'

[properties]
c_args = [
	'-m32',
	'-target', 'riscv32-unknown-elf',
	'-march=rv32imafdc',
	'-Wdouble-promotion',
	'-Werror=double-promotion'
	]
c_link_args = [
	'-m32',
	'-target', 'riscv32-unknown-elf',
	'-march=rv32imafdc',
	'-nostdlib',
	'-L/usr/lib/gcc/riscv64-unknown-elf/8.3.0/rv32imafdc/ilp32d'
	]
needs_exe_wrapper = true
