svn commit: r345832 - projects/runtime-coverage-v2/share/mk
Enji Cooper
ngie at FreeBSD.org
Wed Apr 3 05:08:17 UTC 2019
Author: ngie
Date: Wed Apr 3 05:08:16 2019
New Revision: 345832
URL: https://svnweb.freebsd.org/changeset/base/345832
Log:
bsd.prog.mk: fix some MK_COVERAGE logic
* Remove a misleading test for clang and newer versions of gcc that support
`--coverage` properly.
* Handle .y (yacc) sources when defining `GCNOS` to unbreak the build with
`bin/expr`.
Modified:
projects/runtime-coverage-v2/share/mk/bsd.prog.mk
Modified: projects/runtime-coverage-v2/share/mk/bsd.prog.mk
==============================================================================
--- projects/runtime-coverage-v2/share/mk/bsd.prog.mk Wed Apr 3 04:01:08 2019 (r345831)
+++ projects/runtime-coverage-v2/share/mk/bsd.prog.mk Wed Apr 3 05:08:16 2019 (r345832)
@@ -79,7 +79,7 @@ TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
.if defined(NO_SHARED) && ${NO_SHARED:tl} != "no"
LDFLAGS+= -static
.else
-.if defined(_WANTS_DEBUG) && ${MK_COVERAGE} != "no" && ${COMPILER_FEATURES:Mc++11}
+.if defined(_WANTS_DEBUG) && ${MK_COVERAGE} != "no"
_COV_FLAG= --coverage -fprofile-dir=${COVERAGEDIR}
CFLAGS+= ${_COV_FLAG}
CXXFLAGS+= ${_COV_FLAG}
@@ -324,7 +324,7 @@ NLSNAME?= ${PROG}
.include <bsd.confs.mk>
.if defined(_COV_FLAG) && !empty(SRCS)
-_GCNO_SRCS= ${SRCS:M*.c} ${SRCS:M*.cc} ${SRCS:M*.cpp} ${SRCS:M*.cxx} ${SRCS:M*.C}
+_GCNO_SRCS= ${SRCS:M*.c} ${SRCS:M*.cc} ${SRCS:M*.cpp} ${SRCS:M*.cxx} ${SRCS:M*.C} ${SRCS:M*.y}
GCNOS:= ${_GCNO_SRCS:R:S/$/.gcno/g}
.undef _GCNO_SRCS
.for _gcno in ${GCNOS}
More information about the svn-src-projects
mailing list