@Freddie Chopin: thanks for your detailed answers.
Regarding the copying of the libraries: yes I had figured that out and it does make the Windows builds much faster indeed.
I took the time to investigate the issue I encountered a bit further and I think I nailed it. Logged the stdout and stderr like so:
./build-bleeding-edge-toolchain.sh > stdout.log 2> stderr.log
Turns out the first time I launched your script, I actually used the 'dot' command for some reason instead of running it directly:
. ./build-bleeding-edge-toolchain.sh
The main difference is that it would run the script in the current bash session instead of starting a new one. Thanks to the logging, I figured what went wrong with this: the script was failing during the final steps of each build, and running it with the 'dot' command would make it exit the bash session upon an error and thus terminate the script, which doesn't happen if you run the script directly.
The "offending" parts I think are the following:
* For the native build: it's the "strip" phase (line 757):
find ${installNative} -type f -executable -exec strip {} \; || true
The "strip" command fails for some of the files which are not "strippable" although being executables (eg: shell scripts), and it makes the script exit the bash session.
* For the Windows build: it's the "cp" phase (line 929):
cp /usr/${triplet}/bin/${dll} ${installFolder}/bin/ || true
Some DLL's listed int the ${dll} variable can't be found during the copy (at least on my Linux machine) and thus this makes the script exit the bash session.
Those two sets of "errors" don't matter if you run the script directly (and not via the 'dot' command), because it won't end the script's execution then, so they are harmless then.
Once I figured that, I then ran the script directly and it worked correctly.
Regarding the overall size of the GCC distribution, it looks like it's mainly due to the very inflated size of the 'arm-none-eabi/lib/thumb' subdirectory (I think it's due to the fact that libraries there all embed debug info whereas they don't in the official ARM toolchain distribution: to be checked).
Regarding my attempt to build it on MSYS2, it was mainly for the challenge, but I gave up pretty fast. I have two Linux machines on which I can build this.
As to the support of ADA, I don't have the time to investigate that further. The official repos are there:
https://github.com/AdaCoreFinally, it all inspired me to build a native GCC 9.1.0 for Linux and Win64. I compared optimizations and overall perfomance with code profiling on a few projects. At first sight, it looks like the performance I get with GCC 9.1.0 compared to 8.2.0 (native) with typically -O3 on Core i7's is rather consistantly slightly worse (but like +1-2% execution time or something). I didn't get to test this further so far, nor do that with arm-none-eabi-gcc on Cortex targets, but I would have expected better rather than worse... of course I may have to investigate optimization options to get a better idea.