But if the user uses Windows, that's another problem.
I used to build gcc toolchains for Windows... but on Linux. Building it directly on Windows (using for instance MSYS2) used to work but it stopped being an option a good while ago. If you have Windows 10 or 11, I guess you could do this with WSL, but you'll still need to grab a mingw toolchain to be able to build Windows executables on Linux with all required dependencies. That's something that takes a while to figure all out.
Stupid question, but if you have WSL then why do you need to build a Windows executable?
Even if you're a Windows user, you can just type in PowerShell
wsl riscv64-unknown-elf-gcc -O hello.c -o hello or whatever and it will run the Linux toolchain on the
hello.c source file in your current Windows directory and leave the RISC-V binary there too.
Starting in February, when I bought a Lenovo i9-13900HX laptop at runout prices (the 14900 version was already out), my main work machine was Windows for the first time in my life, replacing the 32 core 2990WX Threadripper 20+ kg water cooled tower I built in 2019.
The laptop is a little bit faster than the Threadripper for things that keep all the cores busy all the time e.g. Linux kernel or LLVM builds, and a
lot faster for things that use a small number of threads or are bursty e.g. GNU builds such as gcc. Plus at 2.5 kg it's 2% lighter than my previous work laptop, a 2011 i7 MacBook Pro. So I can conveniently travel the world with it, use it in cafes etc.
ANYWAY, I basically don't use Windows on it ... just Chrome. And WSL. Most of the time at home the lid is closed and I ssh in from a Mac Mini. I give 22 GB RAM to WSL and 10 GB to Windows 11, which is the least I can give Windows without it becoming completely unusable.
Or at least that's what I was doing until early October, when I got pissed off that Windows doesn't honour
taskset done from within WSL. So then I nuked Windows entirely and now the machine has only Ubuntu 24.04. Works great. The only downside I've found is that the battery life with light use (web browsing, editing code, posting messages like this one) is about 5 hours under Linux vs 6 hours under Windows. NBD. It's almost always plugged in, and if I do go to a cafe or something and there is no socket nearby (or I CBF) it's probably maximum 2-3 hours anyway.
But, other than
taskset not working, and no direct access to USB devices from WSL (things like RNDIS for the Milk-V Duo work fine, but some flashing tools need to be run in Windows), and 10 GB RAM lost to useless bloat, I was very happy with WSL.