From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QYMMR-0001yu-Lh for garchives@archives.gentoo.org; Sun, 19 Jun 2011 18:04:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 855361C05C for ; Sun, 19 Jun 2011 18:04:38 +0000 (UTC) Received: from mail-pv0-f181.google.com (mail-pv0-f181.google.com [74.125.83.181]) by pigeon.gentoo.org (Postfix) with ESMTP id B22201C01E for ; Sun, 19 Jun 2011 17:13:36 +0000 (UTC) Received: by pvg13 with SMTP id 13so287399pvg.40 for ; Sun, 19 Jun 2011 10:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=G2hF4aMHSB5e+rgDpLsBPbrJ7d+mSEsW6BKraxswJy4=; b=ltG1GE9rqm8NBVeHwIpw6RXseLXQ/bWOvK6LRD6M7f1nvAA7ZY73FatCgXsM7HZd/t F/c9IPKUuXW//yyYn7423465oDcPiwBBhDe2Vzqr+Nrim9F5Tc5X6l3cHfhRCIqBeRFF kf6Y4MHIiP3oW8hwG1BRE5st92tTg4QC4oziU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=k3cSl6F9XCnYK7vpmrj06FjUMQWIpz89QUBzyYgKyeAe/jplHLJ4Q5A5CceTbqIDcx NAU0DKgNCEbHYpfPgqJ4HP2QfLbm4MqZuQwnLTOcE/iEj9O3Ktr/860Duww6i2xQNkWR NDW72D9Twy5xV8cnxcim+H6kEvYyD9AKngrpk= Received: by 10.142.7.17 with SMTP id 17mr650232wfg.69.1308503616065; Sun, 19 Jun 2011 10:13:36 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.143.60.1 with HTTP; Sun, 19 Jun 2011 10:13:16 -0700 (PDT) In-Reply-To: References: From: Kfir Lavi Date: Sun, 19 Jun 2011 20:13:16 +0300 Message-ID: Subject: [gentoo-user] Re: emerge package with profiling flags -pg To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=0016368e23113910cb04a613bde1 X-Archives-Salt: X-Archives-Hash: 9a489f83e700539e9e313be95ae08c0c --0016368e23113910cb04a613bde1 Content-Type: text/plain; charset=UTF-8 Ok solved, I run hardened profile, so it adds '-pie'. Cmake will tell that -pie and -pg will not work together. So I added -nopie -pg. I had also needed to delete -fomit-frame-pointer. Regards, Kfir On Sun, Jun 19, 2011 at 7:47 PM, Kfir Lavi wrote: > Hi, > I would like to profile my program, so would like to compile it with the > -pg flag, > to be able to profile it with gprof. > Running the emerge like that produce: > CFLAGS="$CFLAGS -pg" emerge MY_PROG > Gives me the error: > -- Check for working C compiler: /usr/bin/i686-pc-linux-gnu-gcc > -- Check for working C compiler: /usr/bin/i686-pc-linux-gnu-gcc -- broken > CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:52 > (MESSAGE): > The C compiler "/usr/bin/i686-pc-linux-gnu-gcc" is not able to compile a > simple test program. > > This problem will not occur if I just emerge the program: > emerge MY_PROG > > Any help will be appreciated. > Regards, > Kfir > --0016368e23113910cb04a613bde1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ok solved,
I run hardened profile, so it adds '-pie= '.
Cmake will tell that -pie and -pg will not work together.
So= I added -nopie -pg. I had also needed to delete
-fomit-frame-pointer.<= br>
Regards,
Kfir

On Sun, Jun 19, 2011= at 7:47 PM, Kfir Lavi <lavi.kfir@gmail.com> wrote:
Hi,
I would like to profile my program, so would like t= o compile it with the -pg flag,
to be able to profile it with gprof.Running the emerge like that produce:
CFLAGS=3D"$CFLAGS -pg" = emerge MY_PROG
Gives me the error:
-- Check for working C compiler: /usr/bin/i686-pc-li= nux-gnu-gcc
-- Check for working C compiler: /usr/bin/i686-pc-linux-gnu-= gcc -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler= .cmake:52 (MESSAGE):
=C2=A0 The C compiler "/usr/bin/i686-pc-linux-gnu-gcc" is not abl= e to compile a
=C2=A0 simple test program.

This problem will not = occur if I just emerge the program:
emerge MY_PROG

Any help will = be appreciated.
Regards,
Kfir

--0016368e23113910cb04a613bde1--