Date: Fri, 03 Feb 2006 22:59:04 +0100 From: Andreas Tobler <toa@pop.agri.ch> To: freebsd-sparc64@freebsd.org Subject: profiling with cc Message-ID: <43E3D228.6060801@pop.agri.ch>
next in thread | raw e-mail | index | archive | help
Hello, I just wonder what I do wrong. I try to compile a simple hello.c with -pg and I fail with the following: [enterprise:~] andreast% cc hello.c -O2 -pg -fno-show-column -o hello.exe /var/tmp//ccwucjWJ.o(.text+0xc): In function `main': : undefined reference to `_mcount' /usr/lib/libc_p.a(__sparc_utrap_setup.po)(.text+0x8): In function `__sparc_utrap_setup': : undefined reference to `_mcount' /usr/lib/libc_p.a(gmon.po)(.text+0x8): In function `monstartup': : undefined reference to `_mcount' /usr/lib/libc_p.a(gmon.po)(.text+0x1a8): In function `_mcleanup': : undefined reference to `_mcount' /usr/lib/libc_p.a(gmon.po)(.text+0x3e8): In function `moncontrol': : undefined reference to `_mcount' /usr/lib/libc_p.a(gmon.po)(.text+0x468): more undefined references to `_mcount' follow [enterprise:~] andreast% cat hello.c #include <stdio.h> int main (void) { printf("hello\n"); return 1; } [enterprise:~] andreast% cc -v Using built-in specs. Configured with: FreeBSD/sparc64 system compiler Thread model: posix gcc version 3.4.4 [FreeBSD] 20050518 The machine I use for is a enterprise 2, [enterprise:~] andreast% uname -ra FreeBSD enterprise.andreas.nets 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Thu Feb 2 07:18:49 CET 2006 andreast@enterprise.andreas.nets:/usr/obj/home/andreast/devel/src/sys/GENERIC sparc64 Is there something known about this? Do I do something wrong when I buildworld? The only known thing to me is the modification of CFLAGS= -O -pipe. Thanks in advance. Andreas
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43E3D228.6060801>