Module Name: src
Committed By: rillig
Date: Sun Aug 9 05:51:04 UTC 2020
Modified Files:
src/usr.bin/make: Makefile
Log Message:
make(1): allow to build using GCC 9 during development
To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/usr.bin/make/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/Makefile
diff -u src/usr.bin/make/Makefile:1.83 src/usr.bin/make/Makefile:1.84
--- src/usr.bin/make/Makefile:1.83 Sat Aug 8 13:50:23 2020
+++ src/usr.bin/make/Makefile Sun Aug 9 05:51:04 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.83 2020/08/08 13:50:23 rillig Exp $
+# $NetBSD: Makefile,v 1.84 2020/08/09 05:51:04 rillig Exp $
# @(#)Makefile 5.2 (Berkeley) 12/28/90
PROG= make
@@ -56,6 +56,18 @@ COPTS+= -fsanitize=undefined
LDADD+= -fsanitize=undefined
.endif
+# Whether to compile with GCC 9 from pkgsrc, during development.
+USE_GCC9?= no
+.if ${USE_GCC9} == "yes"
+# CC is set further down in this file
+COPTS+= -Wno-attributes # for abs and labs
+COPTS.arch.c+= -Wno-error=format-truncation
+COPTS.dir.c+= -Wno-error=format-truncation
+COPTS.main.c+= -Wno-error=format-truncation
+COPTS.meta.c+= -Wno-error=format-truncation
+COPTS.parse.c+= -Wno-error=format-truncation
+.endif
+
USE_META?= yes
.if ${USE_META:tl} != "no"
@@ -96,6 +108,10 @@ COPTS.job.c+= -Wno-format-nonliteral
COPTS.parse.c+= -Wno-format-nonliteral
COPTS.var.c+= -Wno-format-nonliteral
+.if ${USE_GCC9} == "yes"
+CC= /usr/pkg/gcc9/bin/gcc
+.endif
+
.if defined(TOOLDIR)
# This is a native NetBSD build, use libutil rather than the local emalloc etc.
CPPFLAGS+= -DUSE_EMALLOC