Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Oct 2017 16:27:31 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r324440 - projects/runtime-coverage
Message-ID:  <201710091627.v99GRVRF063664@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Mon Oct  9 16:27:31 2017
New Revision: 324440
URL: https://svnweb.freebsd.org/changeset/base/324440

Log:
  First attempt at adding coverage libraries for gcc-only platforms
  
  gnu/lib/libgcov is needed for gcc --coverage , whereas libprofile-rt is
  required for clang --coverage .
  
  Adopt a pattern similar to SUBDIR.yes for handling both the clang and gcc cases.

Modified:
  projects/runtime-coverage/Makefile.inc1

Modified: projects/runtime-coverage/Makefile.inc1
==============================================================================
--- projects/runtime-coverage/Makefile.inc1	Mon Oct  9 16:20:39 2017	(r324439)
+++ projects/runtime-coverage/Makefile.inc1	Mon Oct  9 16:27:31 2017	(r324440)
@@ -2080,11 +2080,11 @@ _lld=		usr.bin/clang/lld
 .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no"
 _clang_libs=	lib/clang
 .endif
+
 .if ${MK_COVERAGE_SUPPORT} != "no"
-.if ${MK_CLANG} != "no"
-_coverage_libs= lib/libclang_rt/profile
+_coverage_libs.${MK_CLANG}+=	lib/libclang_rt/profile
+_coverage_lib.${MK_GCC}+=	gnu/lib/libgcov
 .endif
-.endif
 
 .if ${MK_GCC_BOOTSTRAP} != "no"
 _gcc=		gnu/usr.bin/cc
@@ -2097,7 +2097,7 @@ cross-tools: .MAKE .PHONY
 .for _tool in \
     ${LOCAL_XTOOL_DIRS} \
     ${_clang_libs} \
-    ${_coverage_libs} \
+    ${_coverage_libs.yes} \
     ${_clang} \
     ${_lld} \
     ${_binutils} \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710091627.v99GRVRF063664>