> As discussed with the FreeBSD gcc ports maintainer, building the > gcc-5-branch 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 trunk r235362, most gcc C++ sources were updated to define > INCLUDE_xxx macros before including gcc/system.h, which fixes the > incompatibility with libc++. However, this revision is most likely too > disruptive to backport to the gcc-5-branch.
As discussed in the thread to define INCLUDE_xxx macros, no headers may be included before GCC system.h because it breaks the GCC build on some systems. The inclusion of C++ headers prior to system.h pulls in system headers that define global macros in conflict with system.h and system headers included later in the sequence. The developers who slipped in C++ headers did so in error, and it has been corrected. Anyone who suggested to the FreeBSD community that it would be acceptable to include C++ headers early was severely mistaken. Sorry. Thanks, David