Subject: port-i386/7224: cannot link with -pg and libraries
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Anders.Hjalmarsson@economics.gu.se>
List: netbsd-bugs
Date: 03/24/1999 13:30:26
>Number:         7224
>Category:       port-i386
>Synopsis:       cannot link with -pg and libraries
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-i386-maintainer (NetBSD/i386 Portmaster)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 24 04:35:01 1999
>Last-Modified:
>Originator:     Anders Hjalmarsson
>Organization:
>Release:        NetBSD-current 19990323
>Environment:
System: NetBSD econahja.econ.gu.se 1.3K NetBSD 1.3K (ECONAHJA) #144: Wed Mar 24 02:48:51 CET 1999 econahja@econahja.econ.gu.se:/usr/src/sys/arch/i386/compile/ECONAHJA i386


>Description:
	Linking profiled programs which use libraries (other than libc)
	does not work unless you add -static
>How-To-Repeat:

econahja% cc -pg p.c -lm
ld: No reference to __DYNAMIC
collect2: ld returned 1 exit status
econahja% cc -static -pg p.c -lm
econahja% cc  -pg p.c
econahja% 


	p.c is

int main()
{
	return 0;
}

>Fix:
>Audit-Trail:
>Unformatted: