Module Name: src
Committed By: mrg
Date: Tue Feb 5 07:47:15 UTC 2019
Modified Files:
src/external/bsd/flex/bin: Makefile
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/flex/bin/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/flex/bin/Makefile
diff -u src/external/bsd/flex/bin/Makefile:1.12 src/external/bsd/flex/bin/Makefile:1.13
--- src/external/bsd/flex/bin/Makefile:1.12 Sun Dec 23 16:27:17 2018
+++ src/external/bsd/flex/bin/Makefile Tue Feb 5 07:47:15 2019
@@ -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.c: scan.l
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>