Port-dreamcast archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

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



On Sun, 27 Jun 2021, Martin Husemann wrote:

> 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

Seems to be needed for GCC 10 now as well.  The following patch allows
building with HAVE_GCC=10 to get past "lex.c".

+Index: usr.bin/xlint/lint1/Makefile
+===================================================================
+RCS file: /cvsroot/src/usr.bin/xlint/lint1/Makefile,v
+retrieving revision 1.72
+diff -u -p -r1.72 Makefile
+--- usr.bin/xlint/lint1/Makefile	23 Jun 2021 07:11:41 -0000	1.72
++++ usr.bin/xlint/lint1/Makefile	27 Jun 2021 13:57:28 -0000
+@@ -28,7 +28,7 @@ CPPFLAGS+=	${DEBUG:D-DDEBUG}
+ COPTS.err.c+=	${${ACTIVE_CC} == "clang":? -Wno-format-nonliteral :}
+ 
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101177
+-.if ${HAVE_GCC} == 9 &&	\
++.if (${HAVE_GCC} == 9 || ${HAVE_GCC} == 10) &&	\
+ 	(${MACHINE_ARCH} == "sh3el" || ${MACHINE_ARCH} == "sh3eb")
+ COPTS.lex.c+=	-O0
+ .endif

-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Home | Main Index | Thread Index | Old Index