https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126786
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Jonathan Wakely <[email protected]>: https://gcc.gnu.org/g:35566ac03c5f25f3f876a1ccbc93bef3f9757ad5 commit r16-9681-g35566ac03c5f25f3f876a1ccbc93bef3f9757ad5 Author: Jonathan Wakely <[email protected]> Date: Mon Aug 17 19:04:34 2026 +0100 libstdc++: Do not overwrite module definition files during build [PR126786] As described in the bug report, when compilation of std.cc or std.compat.cc fails we overwrite the source file with an empty file, and then compile that (so that bootstrap doesn't fail). Then when the module definition files are installed, we install the empty file. We should install the original source, not an empty file. We can create an empty file and compile it, but leave the original source untouched so that it can still be installed. libstdc++-v3/ChangeLog: PR libstdc++/126786 * src/c++23/Makefile.am (empty.cc): New target. (std.lo, std.o, std.compat.lo, std.compat.o): Use empty.cc as fallback instead of overwriting original sources. * src/c++23/Makefile.in: Regenerate. Reviewed-by: Tomasz KamiÅski <[email protected]> (cherry picked from commit e87a450f3ead2d6278a54e93409ff67853de93ef)
