Subject: port-i386/7224: cannot link with -pg and libraries
To: None <>
From: None <>
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
>Originator:     Anders Hjalmarsson
>Release:        NetBSD-current 19990323
System: NetBSD 1.3K NetBSD 1.3K (ECONAHJA) #144: Wed Mar 24 02:48:51 CET 1999 i386

	Linking profiled programs which use libraries (other than libc)
	does not work unless you add -static

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

	p.c is

int main()
	return 0;