Module Name: src
Committed By: msaitoh
Date: Mon May 11 07:26:05 UTC 2015
Modified Files:
src/usr.sbin/sysinst [netbsd-7]: Makefile.inc
Log Message:
Pull up following revision(s) (requested by martin in ticket #746):
usr.sbin/sysinst/Makefile.inc: revision 1.6-1.7
Make gcc generate better debug info when building with DEBUG set.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.4.1 src/usr.sbin/sysinst/Makefile.inc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/Makefile.inc
diff -u src/usr.sbin/sysinst/Makefile.inc:1.5 src/usr.sbin/sysinst/Makefile.inc:1.5.4.1
--- src/usr.sbin/sysinst/Makefile.inc:1.5 Wed Aug 6 12:16:12 2014
+++ src/usr.sbin/sysinst/Makefile.inc Mon May 11 07:26:05 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.5 2014/08/06 12:16:12 martin Exp $
+# $NetBSD: Makefile.inc,v 1.5.4.1 2015/05/11 07:26:05 msaitoh Exp $
#
# Makefile for sysinst
@@ -6,10 +6,6 @@
.include "${.CURDIR}/../../../Makefile.inc"
.endif
-.if empty(DBG:M-g)
-COPTS += -Os
-.endif
-
PROG= sysinst
NOMAN= # defined
@@ -55,7 +51,17 @@ CPPFLAGS+= -I. -I${.CURDIR}/../.. -I${.C
-DCATALOG_DIR=\"${CATALOGDIR}\"
.if (defined(DEBUG))
-CPPFLAGS+=-DDEBUG -g -O0
+.if ${ACTIVE_CC} == "gcc"
+# make gcc run additional passes for better debug info (only needed
+# when compiling with -O0)
+O0TRACKING= -fvar-tracking-assignments -fvar-tracking
+.endif
+CPPFLAGS+=-DDEBUG
+DBG +=-g -O0 ${O0TRACKING}
+.endif
+
+.if empty(DBG:M-g)
+COPTS += -Os
.endif
.if (!defined(SMALLPROG) || defined(SMALLPROG_INET6)) && (${USE_INET6} != "no")