From owner-freebsd-toolchain@FreeBSD.ORG Tue Jan 18 14:31:32 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 17A3E10656A3; Tue, 18 Jan 2011 14:31:32 +0000 (UTC) Date: Tue, 18 Jan 2011 14:31:32 +0000 From: Alexander Best To: Steve Kargl Message-ID: <20110118143132.GA13162@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> 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:31:32 -0000 On Mon Jan 17 11, Steve Kargl wrote: > How does one build an executable for profiling with clang? > > 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? profiling is not yet supported by clang irrc. the same goes for cross-compiling. both features will be introduced in one of the next releases. clang is still missing a few gcc features, however i think that's obvious taking into account that gcc exists way longer than clang. however it's also obvious that in a few years gcc will be completely replaced by clang as main open source C/C++ compiler, since it offers tons of advantages and only very few disadvanteges. cheers. alex > > -- > Steve -- a13x