From owner-svn-ports-all@freebsd.org Fri Nov 25 12:54:03 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10237C54AB5; Fri, 25 Nov 2016 12:54:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9FC5CA5; Fri, 25 Nov 2016 12:54:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPCs1JZ021740; Fri, 25 Nov 2016 12:54:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPCs1uH021739; Fri, 25 Nov 2016 12:54:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251254.uAPCs1uH021739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 12:54:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r427110 - head/lang/gcc/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 12:54:03 -0000 Author: dim (src committer) Date: Fri Nov 25 12:54:01 2016 New Revision: 427110 URL: https://svnweb.freebsd.org/changeset/ports/427110 Log: Fix build of lang/gcc with libc++ 3.9.0, similar to r421625: While testing the clang390-import branch, I ran into the following errors building lang/gcc49: In file included from /wrkdirs/usr/ports/lang/gcc49/work/gcc-4.9.4/gcc/c/c-objc-common.c:33: In file included from /usr/include/c++/v1/new:70: /usr/include/c++/v1/exception:267:5: error: no member named 'fancy_abort' in namespace 'std::__1'; did you mean simply 'fancy_abort'? _VSTD::abort(); ^~~~~~~ /usr/include/c++/v1/__config:451:15: note: expanded from macro '_VSTD' #define _VSTD std::_LIBCPP_NAMESPACE ^ /wrkdirs/usr/ports/lang/gcc49/work/gcc-4.9.4/gcc/system.h:685:13: note: 'fancy_abort' declared here extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; ^ 1 error generated. What is happening here, is that the source file includes gcc/system.h, which defines abort to fancy_abort, and then the source file includes , which attempts to call _VSTD::abort() (the _VSTD is a libc++ alias for std::). The macro definition then causes the above breakage. Newer gcc ports, such as gcc5 and gcc6 don't show this issue, because upstream gcc first added an include of (which indirectly includes ) in r217348 [1], and later even add a direct include of in r232736 [2]. Fix it for this version, by adding the direct include of to gcc/system.h. This makes the 'second' includes of in some .c files superfluous, but at least they won't result in errors. [1] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=217348 [2] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=232736 Approved by: portmgr (antoine) PR: 212465 Added: head/lang/gcc/files/patch-gcc_system.h - copied unchanged from r427090, head/lang/gcc49/files/patch-gcc_system.h Copied: head/lang/gcc/files/patch-gcc_system.h (from r427090, head/lang/gcc49/files/patch-gcc_system.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc/files/patch-gcc_system.h Fri Nov 25 12:54:01 2016 (r427110, copy of r427090, head/lang/gcc49/files/patch-gcc_system.h) @@ -0,0 +1,10 @@ +--- gcc/system.h.orig 2014-01-02 22:23:26 UTC ++++ gcc/system.h +@@ -203,6 +203,7 @@ extern int errno; + + #ifdef __cplusplus + # include ++# include + #endif + + /* Some of glibc's string inlines cause warnings. Plus we'd rather