On Fri, 8 Oct 2021, Greg A. Woods wrote:
If two identical 'mv' commands run in the same directory (with no other commands running there in between) then the second one is going to report an ENOENT error. Given these 'mv' commands are on the tail of a command list that creates the source file, they have to run very nearly in parallel in order to trigger the observed failure.
GCC comes with a move-if-change script to do just this kind of file-rename juggling. Try using that in the rule instead of the home-brew commands... /usr/src/external/gpl3/gcc/dist/move-if-change -RVP