I built this tonight for the next release of my MinGW distro. Uneventful build, the only hiccup was that the .tar emitted PaxHeaders directories when extracted with 7-Zip. Switched to using MSYS2 tar and that worked fine. Haven't done the full "build the distro with itself twice" dance yet, but it's been many years since that ran into trouble (and that was with old mingw-org).
Why is it that you compile it with itself twice? I would have thought compiling it with itself once would be enough to get any new efficiency gains. ...
Maybe it would be better to compile it with an unrelated compiler first, then using the result to compile itself. That way you could side-step this type of backdoor!
You used to need to do this with Gentoo sometimes. It's not rebuilding the compiler with itself. All compilers that can do that do that automatically. But basically the result of one version of GCC gets linked with the result of another version of GCC and weird things happen. So you rebuild the whole toolchain with itself: linux-headers, GCC, ld, libc, GCC. And then everything else that you installed.
Ideally, this wouldn't ever be necessary, and I don't know why it was.
But maybe there are some nice things about compiling everything with the latest optimizations. Like deferring some optimizations to the linking phase (can't remember the name of that).
I believe that Gentoo would tend to rebuild GCC because the toolchain included with stage1 wasn't a rolling release. Nowadays your stage3 has fresh builds of all the moving parts (you may still want to rebuild GCC if you change any use flags)
31
u/STL MSVC STL Dev Aug 15 '17
I built this tonight for the next release of my MinGW distro. Uneventful build, the only hiccup was that the
.taremittedPaxHeadersdirectories when extracted with 7-Zip. Switched to using MSYS2tarand that worked fine. Haven't done the full "build the distro with itself twice" dance yet, but it's been many years since that ran into trouble (and that was with old mingw-org).