Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/flex/bin force -O1 (unless -O0 already present)...



details:   https://anonhg.NetBSD.org/src/rev/be9e77dc24c1
branches:  trunk
changeset: 838975:be9e77dc24c1
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Feb 05 07:47:15 2019 +0000

description:
force -O1 (unless -O0 already present) on m68k with GCC 7.  avoids a
"too-far" reference in scan.c.  was already close with GCC 6.

diffstat:

 external/bsd/flex/bin/Makefile |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r ad23c66382b0 -r be9e77dc24c1 external/bsd/flex/bin/Makefile
--- a/external/bsd/flex/bin/Makefile    Tue Feb 05 07:45:35 2019 +0000
+++ b/external/bsd/flex/bin/Makefile    Tue Feb 05 07:47:15 2019 +0000
@@ -1,5 +1,5 @@
 #      from: @(#)Makefile      5.4 (Berkeley) 6/24/90
-#      $NetBSD: Makefile,v 1.12 2018/12/23 16:27:17 christos Exp $
+#      $NetBSD: Makefile,v 1.13 2019/02/05 07:47:15 mrg Exp $
 #
 # By default, flex will be configured to generate 8-bit scanners only if the
 # -8 flag is given.  If you want it to always generate 8-bit scanners, add
@@ -71,4 +71,11 @@
 
 scan.o yylex.o: parse.h
 
+# 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.scan.c+=        -O1
+. endif
+.endif
+
 .include <bsd.prog.mk>



Home | Main Index | Thread Index | Old Index