Date: Fri, 05 Jan 2018 09:30:58 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 224927] lang/gcc48 lang/gcc49 lang/gcc5: Fix build with clang 6.0.0 Message-ID: <bug-224927-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D224927 Bug ID: 224927 Summary: lang/gcc48 lang/gcc49 lang/gcc5: Fix build with clang 6.0.0 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: gerald@FreeBSD.org Reporter: dim@FreeBSD.org Assignee: gerald@FreeBSD.org Flags: maintainer-feedback?(gerald@FreeBSD.org) Created attachment 189436 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D189436&action= =3Dedit Fix build with clang 6.0.0 for lang/gcc{48,49,5} While testing the new clang600-import branch (see bug 224669), I noticed th= at lang/gcc48, lang/gcc49 and lang/gcc5 fail to compile, due clang++ 6.0.0 now defaulting to -std=3Dgnu++14. There are lots of errors similar to: /wrkdirs/share/dim/ports/lang/gcc5/work/gcc-5.5.0/gcc/wide-int-print.cc:130= :27: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] buf +=3D sprintf (buf, "0x"HOST_WIDE_INT_PRINT_HEX_PURE, wi.elt (--= i)); ^ Upstream fixed this for gcc 6 and later by adding a space between the double quote and the macro names. I tried getting the first stage compiled with -std=3Dgnu++98 by setting USE_CXXSTD=3Dgnu++98, but that lead to lots of compilation errors while bui= lding libstdc++, which apparently needs C++11 or higher to compile. So I have added a post-patch section to the three Makefiles, which searches= out all source files using double quotes followed directly by a few specific ma= cro names, and adds a space, e.g.: 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' Furthermore, lang/gcc5 also needs a separate patch to fix an incorrect call= to error(), which should have been error_at(). That was a mismerge by upstrea= m, but reporting it there is probably futile now. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-224927-13>