From owner-freebsd-questions@FreeBSD.ORG Mon Oct 6 16:32:50 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1C094BE for ; Mon, 6 Oct 2014 16:32:49 +0000 (UTC) Received: from nm17-vm8.bullet.mail.ir2.yahoo.com (nm17-vm8.bullet.mail.ir2.yahoo.com [212.82.96.223]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27FA4688 for ; Mon, 6 Oct 2014 16:32:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1412613159; bh=mQuuCrli+st/jkDjJZT3DKS+icBtSX5IBNsa6jsYcYc=; h=Received:Received:Received:DKIM-Signature:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Disposition-Notification-To:Mime-Version:Content-Type:Content-Transfer-Encoding:From:Subject; b=msuqBHSaXHY9sbiOFmd8ok4ZeaKWcKodcI28yBBxZbcgES4bRvHxcjUq0I4scv0QgQ/jANabjXpnxjP6V+FvIF724dqvfL1xGp9J+DTpbknRGj0BkCg1EhiGH0Ig5xe8D2BmMlM2slIVV2uk1v+Fb4ruqLnx+8C9mF2WnwAQowXLK6oPMmqBVnAquqDIQyH5XBeKvo2aEZSvW30zfE1e1acf9OUEMJWiZVEThC8OFiSwB/whwAbQLoCzLEH9p6Zycq815EzEtRZoweoqgoz2Z/utTqvIpUjLwv8FW7KcRBDwhCvMEddkVkaC9KXVrl6KXLRCUAdZhZZdP5SFMnAo7Q== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.es; b=CBu1Bwj7Q3aeUppn17xx5vRPw+zyOA0oGmOBQ6e44iZGkdgGazndUKnqrMS3LXK63O/PS4faCE4CvjCCk1Q4L9qLJO5yRINGztxeHwahUKUTPy/p+/PObzP8Gi5rQ3rOJs2H2PnyDr4v7yja321i7L+IUORirAeQ4mdBWsJk8tc5z/ZDYJ1uOo+P+RslQUYjAQQWM8y7Ah4whwfUCXFPlzFiivrHGOkf9yzJvbEAQZ8nVUZ7YouXbW5n7GAt/Pjf3Sd1i60PC5ZE4cOpO4Cnv4RaVcNLytXfxI5HFaxUsVhBiekLoroIxkOpcpD/rCkiqlW33iWLT6nSeGxwX6k+ng==; Received: from [212.82.98.59] by nm17.bullet.mail.ir2.yahoo.com with NNFMP; 06 Oct 2014 16:32:39 -0000 Received: from [46.228.39.108] by tm12.bullet.mail.ir2.yahoo.com with NNFMP; 06 Oct 2014 16:32:39 -0000 Received: from [127.0.0.1] by smtp145.mail.ir2.yahoo.com with NNFMP; 06 Oct 2014 16:32:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s1024; t=1412613159; bh=mQuuCrli+st/jkDjJZT3DKS+icBtSX5IBNsa6jsYcYc=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Disposition-Notification-To:Mime-Version:Content-Type:Content-Transfer-Encoding; b=NUsFeYMI3YW2RvGWUZl5AIw9C+ZdLiG7yasnXXHujWB8rCg7fhjIqPfeharltlJIpsaxorCfNdIOX+Mn7lTXNugSWjM7Pta6aTyInnAGmaIhKxCcdHPZYgR2o23bX8T+ttoADU9sysk4BQnoXPJfDzGhsFRamms8yiTTt9v3Kys= X-Yahoo-Newman-Id: 760701.35445.bm@smtp145.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 8v0.E9EVM1lGf2lFMKMscOdkTmYAMCXupgEwPvVqBHMETkd IOYzrYhIDoLJQ.jEem8QvVmFngHVV0TRVGMm9EeMCtKufKvPh_C08O1.9k0E 524frGzL5AgUzYqMkWjWhJNNuDM82lusYbGEdwhdEGqsV7M.Hzqy68yqiO_h BWjJMrcDWixLMekPxe2uYmRDo2m9XJr2wpo1vJ7HiN0bZ5_1qu5in1ipODWW _.thKwEN_wXFbn247XdJsxlWvd83HQ3w6Y.c6ZK_qRF3JqxGFKoybiKSymIW SwM1g3bP40a98lauMsHNhQzBfCBefEUdUGB3UopKYTsloPFRAV.Di_gckNlC 5PGf2FwFRb8I3OxeD0Xw8mLchu3uZNPzLxKe12AyDIya7OkraEIvsz2S.18V n0Wq8Chvtl9ahPkEpPLV911KG_j.g1cwxaRNnpCf0z8XNYlS87ikvuCcrNTd Rx507xnV7sdhier5J.9tUDN8vJShUx8cLYZmFy08h94x150zSw_OU1JlQDYL KWwrCOZtm1fwnf9PdeV0HXHngSNfJoAnU8a38kgAT595fCLoTyYb1_T68ReS ryqwAnv4ELvKEhFJg2URvgQO1VGGGnpG3EyPgeitJ X-Yahoo-SMTP: mX392iiswBAeJNdO_s.EW62LZDJR Date: Mon, 6 Oct 2014 18:33:17 +0200 From: Eduardo Morras To: freebsd-questions@freebsd.org Subject: Re: using code coverage with clang Message-Id: <20141006183317.cfc27cb4d7a2b7b8ce1e3efe@yahoo.es> In-Reply-To: References: X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.22; amd64-portbld-freebsd9.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2014 16:32:50 -0000 On Mon, 6 Oct 2014 09:09:27 -0500 (CDT) "Jeremy C. Reed" wrote: > For a few years I have been building different code with > -fprofile-arcs -ftest-coverage with gcc on different BSDs and > different Linuxes. I would build with that, run various tests, and > then use gcov or lcov to see the code that was ran. > > When I changed from FreeBSD 9.x to 10.0-RELEASE-p1, I went from gcc > to clang. But this causes > /usr/bin/ld: /usr/bin/../lib/libprofile_rt.a: No such file: No such > file or directory > > I don't have that library. Any suggestions on how to get it so I > don't have to maintain later during upgrades. I don't think the > clang ports have it either. > > I'd prefer to not maintain all my dependencies (ports) using gcc. > (Currently I cannot use gcc with the clang-built ports as some > libraries appear to be built differently so references aren't seen > the same.) > > Does anyone have suggestions for doing code coverage with clang? I use the static analyzer (in the Computer Science meaning of the term) from clang. F.ex.: scan-build34 -o /home/gowen/projects/gummy_project/Analyze make -j 2 -e -f Makefile Runs the clang34 static analyzer and outputs a html report. Perhaps it can help you. > Or are there binary packages available for 10.0 on amd64 built with > gcc? > > (I found a forum discussion about it at > https://forums.freebsd.org/viewtopic.php?f=35&t=47260 and several > other reports about it.) --- --- Eduardo Morras