riscvarchive / riscv-fesvr

RISC-V Frontend Server
Other
62 stars 83 forks source link

Use $target_alias for TARGET_DIR if set #47

Closed gmarkall closed 6 years ago

gmarkall commented 6 years ago

The fesvr always looks for pk in riscv64-unknown-elf/bin - however, for a 32-bit pk it is in riscv32-unknown-elf/bin. This commit defines TARGET_ARCH (used in fesvr/htif.cc) based on the value of the --target flag if it is provided to configure. This makes it a bit easier to use Spike / fesvr/ pk for riscv32, as there doesn't seem to be any other straightforward way of telling fesvr where to look for pk.

I've tested this with toolchain builds for both riscv32-unknown-elf and riscv64-unknown-elf, and haven't come across any issues with it.