From owner-freebsd-toolchain@FreeBSD.ORG Tue Jan 18 14:32:08 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E5AA106566B for ; Tue, 18 Jan 2011 14:32:08 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 3AF098FC1F for ; Tue, 18 Jan 2011 14:32:07 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 0B4509CB0DE; Tue, 18 Jan 2011 15:32:06 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iB2S-w98MBwk; Tue, 18 Jan 2011 15:32:05 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 912099CB0FD; Tue, 18 Jan 2011 15:32:05 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.4/8.14.4/Submit) id p0IEW52a043594; Tue, 18 Jan 2011 15:32:05 +0100 (CET) (envelope-from rdivacky) Date: Tue, 18 Jan 2011 15:32:05 +0100 From: Roman Divacky To: Steve Kargl Message-ID: <20110118143205.GA34216@freebsd.org> References: <20110117184411.GA54556@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110117184411.GA54556@troutmask.apl.washington.edu> User-Agent: Mutt/1.4.2.3i Cc: freebsd-toolchain@freebsd.org Subject: Re: How to build an executable with profiling? X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2011 14:32:08 -0000 On Mon, Jan 17, 2011 at 10:44:11AM -0800, Steve Kargl wrote: > How does one build an executable for profiling with clang? LLVM (and thus clang) does not support GPROF profiling. > clang -o testf -O2 -march=native -pipe -static -pg -I/usr/local/include -I../mp testf.c -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -L/usr/home/kargl/work/lib -lm_clang_p > clang: warning: the clang compiler does not support '-pg' > > I suppose it will be pointless to ask, but shouldn't clang > support one of the most basic gcc compiler options if clang > is to replace gcc as the base system compiler? is GPROF really needed at this point? we have HWPMC, isnt it sufficient? roman