As discussed with the FreeBSD gcc ports maintainer [1], building trunk gcc with libc++ requires standard C++ headers to be included *before* gcc/system.h, otherwise the redefinition of abort() to fancy_abort() will cause trouble.
In r235362, most gcc C++ sources were updated to define INCLUDE_xxx macros before including gcc/system.h, which fixes the incompatibility with libc++. However, gcc/gcov.c was apparently missed. Attached is a patch to update it. -Dimitry [1] https://bugs.freebsd.org/216303
gcc-gcov-std-header-usage-1.diff
Description: Binary data
signature.asc
Description: Message signed with OpenPGP using GPGMail