Gentoo Archives: gentoo-user

From: Kfir Lavi <lavi.kfir@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: emerge package with profiling flags -pg
Date: Sun, 19 Jun 2011 18:04:39
Message-Id: BANLkTikNmr7BEZr5CMZfGz8ZfeNywhTQBw@mail.gmail.com
In Reply to: [gentoo-user] emerge package with profiling flags -pg by Kfir Lavi
1 Ok solved,
2 I run hardened profile, so it adds '-pie'.
3 Cmake will tell that -pie and -pg will not work together.
4 So I added -nopie -pg. I had also needed to delete
5 -fomit-frame-pointer.
6
7 Regards,
8 Kfir
9
10 On Sun, Jun 19, 2011 at 7:47 PM, Kfir Lavi <lavi.kfir@×××××.com> wrote:
11
12 > Hi,
13 > I would like to profile my program, so would like to compile it with the
14 > -pg flag,
15 > to be able to profile it with gprof.
16 > Running the emerge like that produce:
17 > CFLAGS="$CFLAGS -pg" emerge MY_PROG
18 > Gives me the error:
19 > -- Check for working C compiler: /usr/bin/i686-pc-linux-gnu-gcc
20 > -- Check for working C compiler: /usr/bin/i686-pc-linux-gnu-gcc -- broken
21 > CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:52
22 > (MESSAGE):
23 > The C compiler "/usr/bin/i686-pc-linux-gnu-gcc" is not able to compile a
24 > simple test program.
25 >
26 > This problem will not occur if I just emerge the program:
27 > emerge MY_PROG
28 >
29 > Any help will be appreciated.
30 > Regards,
31 > Kfir
32 >