Sat Oct 14 06:53:56 2023 UTC ()
the parser.c longjmp vs gcc12 issue affects a few ports,
make the workaround global.


(mrg)
diff -r1.121 -r1.122 src/bin/sh/Makefile

cvs diff -r1.121 -r1.122 src/bin/sh/Makefile (expand / switch to unified diff)

--- src/bin/sh/Makefile 2023/08/14 03:18:14 1.121
+++ src/bin/sh/Makefile 2023/10/14 06:53:56 1.122
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.121 2023/08/14 03:18:14 mrg Exp $ 1# $NetBSD: Makefile,v 1.122 2023/10/14 06:53:56 mrg Exp $
2# @(#)Makefile 8.4 (Berkeley) 5/5/95 2# @(#)Makefile 8.4 (Berkeley) 5/5/95
3 3
4.include <bsd.own.mk> 4.include <bsd.own.mk>
5 5
6PROG= sh 6PROG= sh
7SHSRCS= alias.c arith_token.c arithmetic.c cd.c echo.c error.c eval.c exec.c \ 7SHSRCS= alias.c arith_token.c arithmetic.c cd.c echo.c error.c eval.c exec.c \
8 expand.c histedit.c input.c jobs.c mail.c main.c memalloc.c \ 8 expand.c histedit.c input.c jobs.c mail.c main.c memalloc.c \
9 miscbltin.c mystring.c options.c parser.c redir.c show.c trap.c \ 9 miscbltin.c mystring.c options.c parser.c redir.c show.c trap.c \
10 output.c var.c test.c kill.c syntax.c 10 output.c var.c test.c kill.c syntax.c
11GENSRCS=builtins.c init.c nodes.c 11GENSRCS=builtins.c init.c nodes.c
12GENHDRS=builtins.h nodes.h token.h nodenames.h optinit.h 12GENHDRS=builtins.h nodes.h token.h nodenames.h optinit.h
13SRCS= ${SHSRCS} ${GENSRCS} 13SRCS= ${SHSRCS} ${GENSRCS}
14 14
@@ -84,19 +84,17 @@ optinit.h: mkoptions.sh option.list @@ -84,19 +84,17 @@ optinit.h: mkoptions.sh option.list
84 ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.TARGET} ${.OBJDIR} 84 ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.TARGET} ${.OBJDIR}
85 85
86.if ${USETOOLS} == "yes" 86.if ${USETOOLS} == "yes"
87NBCOMPATLIB= -L${TOOLDIR}/lib -lnbcompat 87NBCOMPATLIB= -L${TOOLDIR}/lib -lnbcompat
88.endif 88.endif
89 89
90SUBDIR.roff+=USD.doc 90SUBDIR.roff+=USD.doc
91 91
92COPTS.printf.c = -Wno-format-nonliteral 92COPTS.printf.c = -Wno-format-nonliteral
93COPTS.jobs.c = -Wno-format-nonliteral 93COPTS.jobs.c = -Wno-format-nonliteral
94COPTS.var.c = -Wno-format-nonliteral 94COPTS.var.c = -Wno-format-nonliteral
95 95
96# XXXGCC12 - only on some targets 96# XXXGCC12 - only on some targets
97.if ${MACHINE_CPU} == "sh3" 
98COPTS.parser.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -O1 :} 97COPTS.parser.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -O1 :}
99.endif 
100 98
101.include <bsd.prog.mk> 99.include <bsd.prog.mk>
102.include <bsd.subdir.mk> 100.include <bsd.subdir.mk>