svn commit: r460692 - in branches/2018Q1/lang: gcc48 gcc49 gcc5 gcc5/files
Mark Felder
feld at FreeBSD.org
Fri Feb 2 10:07:59 UTC 2018
Author: feld
Date: Fri Feb 2 10:07:58 2018
New Revision: 460692
URL: https://svnweb.freebsd.org/changeset/ports/460692
Log:
MFH: r458581
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
Added:
branches/2018Q1/lang/gcc5/files/patch-gcc_toplev.c
- copied unchanged from r458581, head/lang/gcc5/files/patch-gcc_toplev.c
Modified:
branches/2018Q1/lang/gcc48/Makefile
branches/2018Q1/lang/gcc49/Makefile
branches/2018Q1/lang/gcc5/Makefile
Directory Properties:
branches/2018Q1/ (props changed)
Modified: branches/2018Q1/lang/gcc48/Makefile
==============================================================================
--- branches/2018Q1/lang/gcc48/Makefile Fri Feb 2 10:05:18 2018 (r460691)
+++ branches/2018Q1/lang/gcc48/Makefile Fri Feb 2 10:07:58 2018 (r460692)
@@ -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: branches/2018Q1/lang/gcc49/Makefile
==============================================================================
--- branches/2018Q1/lang/gcc49/Makefile Fri Feb 2 10:05:18 2018 (r460691)
+++ branches/2018Q1/lang/gcc49/Makefile Fri Feb 2 10:07:58 2018 (r460692)
@@ -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: branches/2018Q1/lang/gcc5/Makefile
==============================================================================
--- branches/2018Q1/lang/gcc5/Makefile Fri Feb 2 10:05:18 2018 (r460691)
+++ branches/2018Q1/lang/gcc5/Makefile Fri Feb 2 10:07:58 2018 (r460692)
@@ -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*
Copied: branches/2018Q1/lang/gcc5/files/patch-gcc_toplev.c (from r458581, head/lang/gcc5/files/patch-gcc_toplev.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q1/lang/gcc5/files/patch-gcc_toplev.c Fri Feb 2 10:07:58 2018 (r460692, copy of r458581, head/lang/gcc5/files/patch-gcc_toplev.c)
@@ -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");
+
More information about the svn-ports-branches
mailing list