Re: GCC 10 ICE compiling "lex.c"?

Martin Husemann <[email protected]> Sun, 27 Jun 2021 14:30:09 +0200
Newsgroups gmane.os.netbsd.ports.dreamcast
Message-ID <[email protected]>
On Sun, Jun 27, 2021 at 06:29:42AM -0500, John D. Baker wrote:
> I saw the same error for a couple of cycles in the TNF build logs (which
> have now fallen off the end of history), which would still be using GCC
> 9.x but it seems to have been fixed or otherwise cleared up.

I worked around them by lowering optiomization to -O0 for that file,
but conditionalized it on sh3 + gcc9. See src/usr.bin/xlint/lint1/Makefile:

# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101177
.if defined(HAVE_GCC) && ${HAVE_GCC} == 9 &&    \
        (${MACHINE_ARCH} == "sh3el" || ${MACHINE_ARCH} == "sh3eb")
COPTS.lex.c+=   -O0
.endif


Martin