[PATCH] Fix gcc-5-branch build with libc++
Dimitry Andric
dim@FreeBSD.org
Tue Jan 31 22:29:00 GMT 2017
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.
Attached is the patch which has been used in the FreeBSD gcc5 port (see
also https://bugs.freebsd.org/216266 ). Proposed ChangeLog entry:
2017-01-31 Dimitry Andric <dim@FreeBSD.org>
* system.h: For C++, always include <new>.
* graphite-isl-ast-to-gimple.c: Include standard C++ headers before
system.h.
* auto-profile.c: Likewise. Also remove string.h, since it is already
included in system.h.
-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc5-cxx-includes-1.diff
Type: application/octet-stream
Size: 1463 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170131/47ed4608/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170131/47ed4608/attachment.sig>
More information about the Gcc-patches
mailing list