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 <lavi.k...@gmail.com> 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
>

Reply via email to