If pdflatex runs out of memory the build fails with no hint what's wrong. This adds another grep command to the makefile so that an out-of-memory error will result in more information being shown. As suggested in https://bugzilla.redhat.com/show_bug.cgi?id=1841056 using lualatex can be used as a workaround. libstdc++-v3/ChangeLog: * doc/Makefile.am (stamp-pdf-doxygen): Also grep for out-of-memory error in log file. * doc/Makefile.in: Regenerate. Tested x86_64-linux. Committed to trunk.