diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-01-09 22:08:45 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-01-09 22:08:45 +0000 |
commit | 3f6545049c70d6a97ffc29e8f71299f5a6f8b1e2 (patch) | |
tree | c18cd3e6f9e1313cacde86eb7ae36ffb204ba4a5 /lang/gcc48 | |
parent | - Update license to MPL (diff) |
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
Notes
Notes:
svn path=/head/; revision=458581
Diffstat (limited to 'lang/gcc48')
-rw-r--r-- | lang/gcc48/Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lang/gcc48/Makefile b/lang/gcc48/Makefile index d01fbc178102..c1bfab776878 100644 --- a/lang/gcc48/Makefile +++ b/lang/gcc48/Makefile @@ -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* |