From owner-freebsd-sparc64@FreeBSD.ORG Fri Feb 3 21:59:08 2006 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9EBC16A420 for ; Fri, 3 Feb 2006 21:59:08 +0000 (GMT) (envelope-from toa@pop.agri.ch) Received: from exsmtp02.agrinet.ch (exsmtp02.agrinet.ch [81.221.252.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E60D43D55 for ; Fri, 3 Feb 2006 21:59:06 +0000 (GMT) (envelope-from toa@pop.agri.ch) Received: from smtp.messaging.ch ([10.50.252.215]) by exsmtp02.agrinet.ch with Microsoft SMTPSVC(6.0.3790.211); Fri, 3 Feb 2006 22:59:05 +0100 Received: from [192.168.225.5] ([80.219.88.141]) by smtp.messaging.ch with id t9za1T00132ylCo0000000 for freebsd-sparc64@freebsd.org; Fri, 03 Feb 2006 22:59:34 +0100 X-IMP: RBL MAPS_ORDB: 0.00, RBL SPAMCOP: 0.00, RBL SORBS: 0.10, RBL SBL+XBL: 0.00, URL RHS: 0.00, URL SURBL: 0.00 Message-ID: <43E3D228.6060801@pop.agri.ch> Date: Fri, 03 Feb 2006 22:59:04 +0100 From: Andreas Tobler User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 To: freebsd-sparc64@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Feb 2006 21:59:05.0470 (UTC) FILETIME=[0CEB51E0:01C6290D] Subject: profiling with cc X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2006 21:59:08 -0000 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 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