From nobody@FreeBSD.org  Wed Nov 29 18:01:02 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id CA8E616A4D2
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 29 Nov 2006 18:01:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B81D543C9D
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 29 Nov 2006 18:00:59 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id kATI12EO023055
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 29 Nov 2006 18:01:02 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id kATI12F5023054;
	Wed, 29 Nov 2006 18:01:02 GMT
	(envelope-from nobody)
Message-Id: <200611291801.kATI12F5023054@www.freebsd.org>
Date: Wed, 29 Nov 2006 18:01:02 GMT
From: "Dr. Markus Waldeck"<waldeck@gmx.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: makeoptions   DEBUG=-p
X-Send-Pr-Version: www-3.0

>Number:         106023
>Category:       kern
>Synopsis:       makeoptions   DEBUG=-p
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 29 18:10:08 GMT 2006
>Closed-Date:    Wed Nov 29 21:23:07 GMT 2006
>Last-Modified:  Wed Nov 29 21:23:07 GMT 2006
>Originator:     Dr. Markus Waldeck
>Release:        7.0-CURRENT-200611
>Organization:
>Environment:
FreeBSD fbh 7.0-CURRENT-200611 FreeBSD 7.0-CURRENT-200611
root@fb:/usr/src/sys/i386/compile/FB70B01 i386
>Description:
I read about kgmon and tried to build a GENERIC kernel with

makeoptions   DEBUG=-p

instead of

makeoptions   DEBUG=-g                # Build kernel with gdb(1) debug symbols

I got following compilation error

MAKE=make sh ../../../conf/newvers.sh GENERIC
cc -c -O -pipe  -std=c99 -p -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -fformat-extensions -nostdinc -I-  -I. -I../../.. -I../../../contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror  vers.c
linking kernel.debug
aic7xxx_reg_print.o(.text+0x4): In function `ahc_scsiseq_print':
: undefined reference to `.mcount'
aic7xxx_reg_print.o(.text+0x2c): In function `ahc_sxfrctl0_print':
: undefined reference to `.mcount'
aic7xxx_reg_print.o(.text+0x54): In function `ahc_sxfrctl1_print':
: undefined reference to `.mcount'
aic7xxx_reg_print.o(.text+0x7c): In function `ahc_scsisigi_print':
: undefined reference to `.mcount'
aic7xxx_reg_print.o(.text+0xa4): In function `ahc_scsisigo_print':
: undefined reference to `.mcount'
aic7xxx_reg_print.o(.text+0xcc): more undefined references to `.mcount' follow
*** Error code 1

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Wed Nov 29 21:20:00 UTC 2006 
State-Changed-Why:  
A kernel is configured for profiling with "config -p ..."; 
see config(8) for details.  Or, in the buildkernel variant: 
"make buildkernel CONFIGARGS=-p" (-pp for high resolution). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106023 
>Unformatted:
