[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gprof with -lc_p: anyone able to do it?



"Paul D. Smith" <psmith@gnu.org> writes:
> I wanted to do some profiling on GNU make, so I installed the libc6-prof
> package (I'm using testing) and built make like this:
>
>   $ make CFLAGS='-g -pg' LDFLAGS='-g -pg' LIBS=-lc_p
>
> But this is very unhappy:
>
>   $ ./make
>   Segmentation fault

When I've played with it, you need to link libc_p.a but *not*
libc.so.  This probably involves some makefile frobbing; the final
link winds up looking like

  gcc -g -pg -o foo -nodefaultlibs *.o -lc_p -lgcc

I haven't tried this particularly recently on a Debian machine,
though.

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: