Bug #2325

compiling c++ program in profile mode doesn't work

Added by phma over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:03/03/2012
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


phma@darner:/tmp$ g++ -pg -o proftest proftest.cpp
/usr/libexec/binutils222/elf/ld.bfd: cannot find -lm_p
phma@darner:/tmp$ g++ -p -o proftest proftest.cpp
consider using '-pg' instead of '-p' with gprof(1)
/usr/libexec/binutils222/elf/ld.bfd: cannot find -lm_p

The same command succeeds on Linux. I noticed this when trying to profile a much larger program which is a CMake project; the attached program is a minimal program for getting anything useful out of gprof (or would if the loop count were bigger).

proftest.cpp Magnifier (225 Bytes) phma, 03/03/2012 06:20 PM


#1 Updated by swildner over 4 years ago


I've committed a fix to master. Please try again.


#2 Updated by alexh over 4 years ago

  • Status changed from New to Feedback

#3 Updated by phma over 4 years ago

  • Status changed from Feedback to Closed

Fixed. Thanks!

Also available in: Atom PDF