[binaries]
# Meson 0.53.2 doesn't use any cflags when doing basic compiler tests,
# so we have to add -nostdlib to the compiler configuration itself or
# early compiler tests will fail. This can be removed when picolibc
# requires at least version 0.54.2 of meson.
c = ['ccache', 'clang', '-target', 'riscv64-unknown-elf', '-mcmodel=medany', '-nostdlib']
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'
# only needed to run tests
exe_wrapper = ['sh', '-c', 'test -z "$PICOLIBC_TEST" || run-riscv "$@"', 'run-riscv']

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

[properties]
c_args = ['-Werror=double-promotion', '-fshort-enums']
c_link_args = ['-L/usr/lib/gcc/riscv64-unknown-elf/13.2.0/rv64imac/lp64/', '-L/usr/lib/gcc/riscv64-unknown-elf/12.2.0/rv64imac/lp64/', '-L/usr/lib/gcc/riscv64-unknown-elf/12.1.0/rv64imac/lp64/', '-Wno-unused-command-line-argument']
skip_sanity_check = true
has_link_defsym = true
default_flash_addr = '0x80000000'
default_flash_size = '0x00200000'
default_ram_addr   = '0x80200000'
default_ram_size   = '0x00200000'
