Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/ipf/bin apply -O1 for ipf_y.c on m68k and GCC 7.



details:   https://anonhg.NetBSD.org/src/rev/d390ad59bfba
branches:  trunk
changeset: 996597:d390ad59bfba
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Feb 05 08:08:59 2019 +0000

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

diffstat:

 external/bsd/ipf/bin/ipf/Makefile     |  9 ++++++++-
 external/bsd/ipf/bin/ipftest/Makefile |  9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r ab46e5e33e4e -r d390ad59bfba external/bsd/ipf/bin/ipf/Makefile
--- a/external/bsd/ipf/bin/ipf/Makefile Tue Feb 05 08:07:59 2019 +0000
+++ b/external/bsd/ipf/bin/ipf/Makefile Tue Feb 05 08:08:59 2019 +0000
@@ -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 @@
 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>
diff -r ab46e5e33e4e -r d390ad59bfba external/bsd/ipf/bin/ipftest/Makefile
--- a/external/bsd/ipf/bin/ipftest/Makefile     Tue Feb 05 08:07:59 2019 +0000
+++ b/external/bsd/ipf/bin/ipftest/Makefile     Tue Feb 05 08:08:59 2019 +0000
@@ -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 @@
        ${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>



Home | Main Index | Thread Index | Old Index