Date: Tue, 18 May 2004 14:50:31 +0900 From: Till Plewe <till@score.is.tsukuba.ac.jp> To: freebsd-amd64@freebsd.org Subject: Re: profiling on amd64 Message-ID: <20040518055031.GA75775%till@score.is.tsukuba.ac.jp> In-Reply-To: <20040518050421.GA75633%till@score.is.tsukuba.ac.jp> References: <20040518050421.GA75633%till@score.is.tsukuba.ac.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 18, 2004 at 02:04:21PM +0900, Till Plewe wrote: > > The program "int main(){return 0;}" fails to compile if I use the > option "-pg". The error message I get starts with: > > # gcc -pg -o test test.c > /var/tmp//ccTPXtQI.o: In function `main': > /var/tmp//ccTPXtQI.o(.text+0x5): undefined reference to `mcount' > /usr/lib/libc_p.a(gmon.po): In function `monstartup': > gmon.po(.text+0xa): undefined reference to `mcount > ... > > I am using 5.2-CURRENT cvsuped 3 hours ago. > > It looks like a gcc bug since there are several related bug reports > for other OSs (the once I looked were all for 64bit architectures). > > Does anybody know how to fix this? > > TIA > > - Till > It seems that gprof is not build any longer by default. "/usr/src/usr.bin/gprof" does not contain the files amd64.{c,h} needed to build gprof. Since the files for the other architectures seem to be essentially the same I just used copies of these to build gprof. But since I cannot produce *.gmon files as long as gcc -pg does not work I cannot check if the resulting binary works or not. Are there amd64 specific problems with gprof or is gprof being replaced by some other profiler? - Till
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040518055031.GA75775%till>