From owner-svn-ports-all@freebsd.org Tue Jan 9 22:08:47 2018 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 42927E76099; Tue, 9 Jan 2018 22:08:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E9B874290; Tue, 9 Jan 2018 22:08:47 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 677951CDFE; Tue, 9 Jan 2018 22:08:46 +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 w09M8kWn029517; Tue, 9 Jan 2018 22:08:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w09M8jeq029512; Tue, 9 Jan 2018 22:08:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801092208.w09M8jeq029512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 Jan 2018 22:08:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458581 - in head/lang: gcc48 gcc49 gcc5 gcc5/files X-SVN-Group: ports-head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/lang: gcc48 gcc49 gcc5 gcc5/files X-SVN-Commit-Revision: 458581 X-SVN-Commit-Repository: ports 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.25 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: Tue, 09 Jan 2018 22:08:47 -0000 Author: dim (src committer) Date: Tue Jan 9 22:08:45 2018 New Revision: 458581 URL: https://svnweb.freebsd.org/changeset/ports/458581 Log: Fix builds of lang/gcc{48,49,5} with clang 6.0.0 Since clang++ 6.0.0 now defaults to -std=gnu++14 (similar to g++ 6 and higher), building gcc48, gcc49 or gcc5 produce quite a number of "invalid suffix on literal; C++11 requires a space between literal and identifier" errors. This is because in many places, double quotes are directly followed by printf helper macros like HOST_WIDE_INT_PRINT. In gcc 6 and later, spaces were added between the double quotes and the macros, to fix this issue, but for earlier versions, use a combination of find, grep and sed to add them mechanically throughout the respective source trees. In addition, gcc5 needs a regular patch to fix an incorrect call to error(), which should have been error_at(). (This was a mismerge by upstream.) Approved by: gerald (maintainer) PR: 224927 MFH: 2018Q1 Added: head/lang/gcc5/files/patch-gcc_toplev.c (contents, props changed) Modified: head/lang/gcc48/Makefile head/lang/gcc49/Makefile head/lang/gcc5/Makefile Modified: head/lang/gcc48/Makefile ============================================================================== --- head/lang/gcc48/Makefile Tue Jan 9 22:07:43 2018 (r458580) +++ head/lang/gcc48/Makefile Tue Jan 9 22:08:45 2018 (r458581) @@ -120,6 +120,11 @@ SUB_LIST+= TARGLIB=${TARGLIB} pre-everything:: @${ECHO_MSG} "Making GCC ${PORTVERSION} for ${CONFIGURE_TARGET} [${LANGUAGES}]" +post-patch: + @${FIND} ${WRKSRC} -type f -name '*.[ch]' | \ + ${XARGS} ${EGREP} -l '"(HOST_WIDE|PLUGIN_COND)' | \ + ${XARGS} ${REINPLACE_CMD} -E -e 's/"(HOST_WIDE|PLUGIN_COND)/" \1/g' + pre-configure: cd ${WRKSRC} ; contrib/gcc_update --touch @${RM} ${WRKSRC}/gcc/*/*.info* Modified: head/lang/gcc49/Makefile ============================================================================== --- head/lang/gcc49/Makefile Tue Jan 9 22:07:43 2018 (r458580) +++ head/lang/gcc49/Makefile Tue Jan 9 22:08:45 2018 (r458581) @@ -120,6 +120,11 @@ SUB_LIST+= TARGLIB=${TARGLIB} pre-everything:: @${ECHO_MSG} "Making GCC ${PORTVERSION} for ${CONFIGURE_TARGET} [${LANGUAGES}]" +post-patch: + @${FIND} ${WRKSRC} -type f -name '*.[ch]' | \ + ${XARGS} ${EGREP} -l '"(HOST_WIDE|PLUGIN_COND)' | \ + ${XARGS} ${REINPLACE_CMD} -E -e 's/"(HOST_WIDE|PLUGIN_COND)/" \1/g' + pre-configure: cd ${WRKSRC} ; contrib/gcc_update --touch @${RM} ${WRKSRC}/gcc/*/*.info* Modified: head/lang/gcc5/Makefile ============================================================================== --- head/lang/gcc5/Makefile Tue Jan 9 22:07:43 2018 (r458580) +++ head/lang/gcc5/Makefile Tue Jan 9 22:08:45 2018 (r458581) @@ -117,6 +117,11 @@ CONFIGURE_ARGS+=--enable-languages=${LANGUAGES} pre-everything:: @${ECHO_MSG} "Making GCC ${PORTVERSION} for ${CONFIGURE_TARGET} [${LANGUAGES}]" +post-patch: + @${FIND} ${WRKSRC} -type f \( -name '*.[ch]' -o -name '*.cc' \) | \ + ${XARGS} ${EGREP} -l '"(HOST_WIDE|PLUGIN_COND|PRId64)' | \ + ${XARGS} ${REINPLACE_CMD} -E -e 's/"(HOST_WIDE|PLUGIN_COND|PRId64)/" \1/g' + pre-configure: cd ${WRKSRC} ; contrib/gcc_update --touch @${RM} ${WRKSRC}/gcc/*/*.info* Added: head/lang/gcc5/files/patch-gcc_toplev.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc5/files/patch-gcc_toplev.c Tue Jan 9 22:08:45 2018 (r458581) @@ -0,0 +1,11 @@ +--- gcc/toplev.c.orig 2018-01-04 15:22:21 UTC ++++ gcc/toplev.c +@@ -1386,7 +1386,7 @@ process_options (void) + + if (flag_sanitize & SANITIZE_THREAD) + { +- error (UNKNOWN_LOCATION, ++ error_at (UNKNOWN_LOCATION, + "%<-fcheck-pointer-bounds%> is not supported with " + "Thread Sanitizer"); +