foss-for-synopsys-dwc-arc-processors/toolchain

Newlib for ARC-V uses wrong file-descriptor on write to semihosting

Closed this issue · 1 comments

This leads to a funny behavior: write() to stdout from the simulated target (be it QEMU or nSIM) ends-up being sent to host's stdin. And we never noticed that because on Linux hosts it's apparently possible to write to stdin and these messages even end-up being printed in the console. On Windows hosts though writes to stdin end-up being omitted by the OS and so nothing get printed.

Luckily, solution to that problem is already available, see RISC-V: fix setting up std streams in init_semihosting(). And so we do need to get that fix in our Binutils sources used for ARC-V toolchain building.