Subject: pkg/9921: unproven-pthreads has broken pgcc script
To: None <gnats-bugs@gnats.netbsd.org>
From: None <deberg@mit.edu>
List: netbsd-bugs
Date: 04/17/2000 21:10:10
>Number:         9921
>Category:       pkg
>Synopsis:       unproven-pthreads has broken pgcc script
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 17 21:11:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     matt
>Release:        1.4T
>Organization:
matt debergalis <deberg@mit.edu> KB1CTH
finger deberg@ai.mit.edu for PGP key
>Environment:
	
System: NetBSD chamomile.deberg.org 1.4T NetBSD 1.4T (DEBERG) #11: Sat Feb 26 17:51:24 EST 2000 deberg@chamomile.deberg.org:/src/netbsd/src/sys/arch/i386/compile/DEBERG i386


>Description:
	/usr/pkg/pthreads/bin/pgcc is broken, because it allows you to
override the -Wl,-R/usr/pkg/pthreads/lib flag accidentally.
>How-To-Repeat:
	try to build a threaded program using pgcc where:

	/usr/pkg/lib/libpthreads.so exists (see devel/pth)

and
	for whatever reason, the build adds a -Wl,-R/usr/pkg/lib to the
cc command.
>Fix:
	it seems that library specifications for the pthreads path
should come *before* any user-specified libraries, since pgcc is
supposed to make the use of -lpthreads transparent.

--- pgcc	Tue Apr 18 00:08:16 2000
+++ /usr/pkg/pthreads/bin/pgcc	Tue Apr 18 00:06:49 2000
@@ -30,4 +31,4 @@
 
 # Include the -L option in any case, just in case the user provided the
 # names of some libraries we've built threaded versions of.
-eval exec gcc '"$@"' $include_dir $lib_dir $ldrun $libs
+eval exec gcc $lib_dir $ldrun '"$@"' $include_dir $libs


>Release-Note:
>Audit-Trail:
>Unformatted: