Date: Sun, 22 Oct 2017 07:12:55 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324847 - projects/runtime-coverage/share/mk Message-ID: <201710220712.v9M7Ct31010370@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sun Oct 22 07:12:55 2017 New Revision: 324847 URL: https://svnweb.freebsd.org/changeset/base/324847 Log: It _was_ .gcno's, not .gcda's that get produced with cc --coverage Try to install them instead of the .gcda's, since the .gcda's likely won't exist. TODO: verify that installworld does indeed do the right thing. Ref: gcc(1) -ftest-coverage description; --coverage (option in use) is an alias for -fprofile-arcs -ftest-coverage Modified: projects/runtime-coverage/share/mk/bsd.cov.mk projects/runtime-coverage/share/mk/bsd.lib.mk projects/runtime-coverage/share/mk/bsd.prog.mk Modified: projects/runtime-coverage/share/mk/bsd.cov.mk ============================================================================== --- projects/runtime-coverage/share/mk/bsd.cov.mk Sun Oct 22 03:52:26 2017 (r324846) +++ projects/runtime-coverage/share/mk/bsd.cov.mk Sun Oct 22 07:12:55 2017 (r324847) @@ -2,9 +2,9 @@ # # Snippet for dealing with runtime coverage logic. # -# .gcda files are generated from files that are compiled from source, e.g., -# foo.gcda is foo.c or foo.cpp's file. In order for the libraries and programs -# to be properly instrumented, the .gcda files must be installed to a prefix +# .gcno files are generated from files that are compiled from source, e.g., +# foo.gcno is foo.c or foo.cpp's file. In order for the libraries and programs +# to be properly instrumented, the .gcno files must be installed to a prefix # common to the object files. # # See gcov(1) for more details. @@ -13,12 +13,12 @@ FILESGROUPS?= FILES -.if !empty(GCDAS) -GCDAS:= ${GCDAS:O:u} -FILESGROUPS+= GCDAS -CLEANFILES+= ${GCDAS} +.if !empty(GCNOS) +GCNOS:= ${GCNOS:O:u} +FILESGROUPS+= GCNOS +CLEANFILES+= ${GCNOS} -.for _gcda in ${GCDAS} -GCDASDIR_${_gcda:T}= ${COVERAGEDIR}${_gcda:H:tA} +.for _gcno in ${GCNOS} +GCNOSDIR_${_gcno:T}= ${COVERAGEDIR}${_gcno:H:tA} .endfor .endif Modified: projects/runtime-coverage/share/mk/bsd.lib.mk ============================================================================== --- projects/runtime-coverage/share/mk/bsd.lib.mk Sun Oct 22 03:52:26 2017 (r324846) +++ projects/runtime-coverage/share/mk/bsd.lib.mk Sun Oct 22 07:12:55 2017 (r324847) @@ -459,11 +459,11 @@ _libinstall: .if !defined(LIBRARIES_ONLY) .include <bsd.nls.mk> .if defined(_COV_FLAG) -_GCDA_SRCS= ${SRCS:M*.c} ${SRCS:M*.cc} ${SRCS:M*.cpp} ${SRCS:M*.cxx} ${SRCS:M*.C} -GCDAS:= ${_GCDA_SRCS:R:S/$/.gcda/g} -.undef _GCDA_SRCS -.for _gcda in ${GCDAS} -${_gcda}: ${_gcda:R}.pico +_GCNO_SRCS= ${SRCS:M*.c} ${SRCS:M*.cc} ${SRCS:M*.cpp} ${SRCS:M*.cxx} ${SRCS:M*.C} +GCNOS:= ${_GCNO_SRCS:R:S/$/.gcno/g} +.undef _GCNO_SRCS +.for _gcno in ${GCNOS} +${_gcno}: ${_gcno:R}.pico .endfor .include <bsd.cov.mk> .endif Modified: projects/runtime-coverage/share/mk/bsd.prog.mk ============================================================================== --- projects/runtime-coverage/share/mk/bsd.prog.mk Sun Oct 22 03:52:26 2017 (r324846) +++ projects/runtime-coverage/share/mk/bsd.prog.mk Sun Oct 22 07:12:55 2017 (r324847) @@ -307,10 +307,10 @@ NLSNAME?= ${PROG} .include <bsd.confs.mk> .if defined(_COV_FLAG) _GCDA_SRCS= ${SRCS:M*.c} ${SRCS:M*.cc} ${SRCS:M*.cpp} ${SRCS:M*.cxx} ${SRCS:M*.C} -GCDAS:= ${_GCDA_SRCS:R:S/$/.gcda/g} +GCDAS:= ${_GCDA_SRCS:R:S/$/.gcno/g} .undef _GCDA_SRCS -.for _gcda in ${GCDAS} -${_gcda}: ${_gcda:R}.pico +.for _gcno in ${GCDAS} +${_gcno}: ${_gcno:R}.pico .endfor .include <bsd.cov.mk> .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710220712.v9M7Ct31010370>