Subject: bin/19348: profiling doesn't work with USETOOLS=yes
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lukem@netbsd.org>
List: netbsd-bugs
Date: 12/12/2002 02:20:11
>Number:         19348
>Category:       bin
>Synopsis:       profiling doesn't work with USETOOLS=yes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 11 07:21:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Luke Mewburn
>Release:        NetBSD 1.6_STABLE
>Organization:
>Environment:
System: NetBSD argo.mewburn.net 1.6_STABLE NetBSD 1.6_STABLE (ARGO from GENERIC-$Revision: 1.491.4.2 $) #0: Sun Oct 13 18:45:29 EST 2002 lukem@argo.mewburn.net:/var/scratch/obj.i386/usr/src/sys/arch/i386/compile/ARGO i386
Architecture: i386
Machine: i386
>Description:
	Programs compiled with '-pg' with USETOOLS=yes don't
	generate the gmon.out profiling file (c.f, gprof(1)).

>How-To-Repeat:
	Add
		COPTS+=-pg
		LDFLAGS+=-pg
	and make a program with USETOOLS=yes (the default).
	Run it.  Notice that gmon.out isn't created/updated.

	Rebuild with "USETOOLS=no" and notice that gmon.out is
	created.

>Fix:
	Probably something to do with selecting gcrt0.o instead of
	crt0.o when USETOOLS=yes overrides the linker stuff.
>Release-Note:
>Audit-Trail:
>Unformatted: