Bug 216303 - lang/gcc7-devel: Fix build with libc++ 4.0.0
Summary: lang/gcc7-devel: Fix build with libc++ 4.0.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Gerald Pfeifer
URL:
Keywords:
Depends on:
Blocks: 216008
  Show dependency treegraph
 
Reported: 2017-01-19 22:50 UTC by Dimitry Andric
Modified: 2017-01-31 01:00 UTC (History)
2 users (show)

See Also:
gerald: maintainer-feedback+
gerald: merge-quarterly+


Attachments
Fix system includes in lang/gcc7-devel (1.06 KB, patch)
2017-01-19 22:50 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer 2017-01-19 22:50:10 UTC
Created attachment 179118 [details]
Fix system includes in lang/gcc7-devel

Similar to bug 212465 and bug 216266, lang/gcc7-devel doesn't compile with libc++ 4.0.0, due to clashes between the redefined abort macro and standard C++ headers.

In gcc7 they seem to have realized this issue, and are now using system.h to pull in C++ standard headers, when INCLUDE_xxx is defined, where xxx is ALGORITHM, VECTOR, and so on.

In this case only gcov.c needs to be fixed.  This should probably be committed upstream too.
Comment 1 Gerald Pfeifer freebsd_committer 2017-01-20 21:07:23 UTC
This is fine; thanks for digging into this and providing the patch, Dim!

Just one request: mind naming the patch files/patch-libc++ ?  That'll 
help me manage things in the longer term.


Yes, this definitely should be submitted upstream.  If you send this
to gcc-patches@gcc.gnu.org, I promise to push it there and commit it.

(I'll also create a ChangeLog entry if you prefer, your submission
does not have to carry one if you don't know how/want to create one.)

Deal? :-)
Comment 2 Gerald Pfeifer freebsd_committer 2017-01-20 21:09:13 UTC
Oh, and if you prefer I'll take care of committing this to lang/gcc7-devel;
just let me know.

(If you could submit to gcc-patches@gcc.gnu.org, that would still be great.)
Comment 3 commit-hook freebsd_committer 2017-01-21 19:17:13 UTC
A commit references this bug:

Author: dim
Date: Sat Jan 21 19:16:07 UTC 2017
New revision: 432076
URL: https://svnweb.freebsd.org/changeset/ports/432076

Log:
  Fix system includes in lang/gcc7-devel

  Similar to bug 212465 and bug 216266, lang/gcc7-devel doesn't compile
  with libc++ 4.0.0, due to clashes between the redefined abort macro and
  standard C++ headers.

  Upstream seems to have realized this issue, and are now using system.h
  to pull in C++ standard headers, when INCLUDE_xxx is defined, where xxx
  is ALGORITHM, VECTOR, and so on.

  In this case only gcov.c needs to be fixed.

  Approved by:	gerald (maintainer)
  PR:		216303
  MFH:		2017Q1

Changes:
  head/lang/gcc7-devel/files/patch-libc++
Comment 4 Gerald Pfeifer freebsd_committer 2017-01-22 09:38:08 UTC
Thanks, Dimitry!

I did ping the upstream maintainers of this part of GCC and also added
the "merge quarterly" flag, and think we can now close this PR now your
fix is in.