<div dir="ltr">Ok solved,<br>I run hardened profile, so it adds '-pie'. <br>Cmake will tell that -pie and -pg will not work together. <br>So I added -nopie -pg. I had also needed to delete <br>-fomit-frame-pointer.<br> <br>Regards,<br>Kfir<br><br><div class="gmail_quote">On Sun, Jun 19, 2011 at 7:47 PM, Kfir Lavi <span dir="ltr"><<a href="mailto:lavi.kfir@gmail.com">lavi.kfir@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div dir="ltr">Hi,<br>I would like to profile my program, so would like to compile it with the -pg flag, <br>to be able to profile it with gprof.<br>Running the emerge like that produce:<br>CFLAGS="$CFLAGS -pg" emerge MY_PROG<br> Gives me the error:<br>-- Check for working C compiler: /usr/bin/i686-pc-linux-gnu-gcc<br>-- Check for working C compiler: /usr/bin/i686-pc-linux-gnu-gcc -- broken<br>CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):<br> The C compiler "/usr/bin/i686-pc-linux-gnu-gcc" is not able to compile a<br> simple test program.<br><br>This problem will not occur if I just emerge the program:<br>emerge MY_PROG<br><br>Any help will be appreciated.<br> Regards,<br>Kfir<br></div> </blockquote></div><br></div>