Module Name:    src
Committed By:   mrg
Date:           Tue Feb  5 08:08:59 UTC 2019

Modified Files:
        src/external/bsd/ipf/bin/ipf: Makefile
        src/external/bsd/ipf/bin/ipftest: Makefile

Log Message:
apply -O1 for ipf_y.c on m68k and GCC 7.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ipf/bin/ipf/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ipf/bin/ipftest/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ipf/bin/ipf/Makefile
diff -u src/external/bsd/ipf/bin/ipf/Makefile:1.1 src/external/bsd/ipf/bin/ipf/Makefile:1.2
--- src/external/bsd/ipf/bin/ipf/Makefile:1.1	Fri Mar 23 21:29:44 2012
+++ src/external/bsd/ipf/bin/ipf/Makefile	Tue Feb  5 08:08:59 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2012/03/23 21:29:44 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2019/02/05 08:08:59 mrg Exp $
 
 .include <bsd.own.mk>		# for MKDYNAMICROOT definition
 
@@ -41,4 +41,11 @@ BINDIR=		/sbin
 LDSTATIC?=	-static
 .endif
 
+# Ugh. Generates too large offsets with -O2.
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+. if ${MACHINE_CPU} == "m68k" && empty(CFLAGS:M-O0)
+COPTS.ipf_y.c+=	-O1
+. endif
+.endif
+
 .include <bsd.prog.mk>

Index: src/external/bsd/ipf/bin/ipftest/Makefile
diff -u src/external/bsd/ipf/bin/ipftest/Makefile:1.4 src/external/bsd/ipf/bin/ipftest/Makefile:1.5
--- src/external/bsd/ipf/bin/ipftest/Makefile:1.4	Sat Jan 23 21:22:45 2016
+++ src/external/bsd/ipf/bin/ipftest/Makefile	Tue Feb  5 08:08:59 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2016/01/23 21:22:45 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2019/02/05 08:08:59 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -102,4 +102,11 @@ ipf_l.h: lexer.h
 	${TOOL_SED} -e 's/yy/ipf_yy/g' \
 	    ${.ALLSRC} > ${.TARGET}
 
+# Ugh. Generates too large offsets with -O2.
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+. if ${MACHINE_CPU} == "m68k" && empty(CFLAGS:M-O0)
+COPTS.ipf_y.c+=	-O1
+. endif
+.endif
+
 .include <bsd.prog.mk>

Reply via email to