Subject: bin/9527: collect2 breaks if directory called ld too early in $PATH
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rhialto@polder.ubc.kun.nl>
List: netbsd-bugs
Date: 03/03/2000 13:18:59
>Number:         9527
>Category:       bin
>Synopsis:       collect2 (and thus cc) breaks if directory called ld too early in $PATH
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar  3 13:18:01 2000
>Last-Modified:
>Originator:     Olaf 'Rhialto' Seibert
>Organization:
	
>Release:        1.4.1
>Environment:
	
System: NetBSD azenomei.falu.nl 1.4.1 NetBSD 1.4.1 (AZENOMEI) #22: Tue Feb 22 22:39:20 CET 2000 rhialto@azenomei.falu.nl:/usr/src/sys/arch/alpha/compile/AZENOMEI alpha


>Description:
	
	If you have a directory called "ld" in your $PATH before the
	real ld (the linker), you cannot compile any programs.
>How-To-Repeat:
	
Script started on Fri Mar  3 22:10:38 2000
azenomei.3:/tmp$ l c.c
-rw-r--r--  1 rhialto  wheel  18 Mar  3 21:27 c.c
azenomei.3:/tmp$ gcc c.c
azenomei.3:/tmp$ mkdir ld
azenomei.3:/tmp$ gcc c.c
collect2: ld returned 33 exit status
azenomei.3:/tmp$ echo $PATH
.:/home/rhialto/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin:/usr/X11R6/bin:/usr/games
azenomei.3:/tmp$ exit

Script done on Fri Mar  3 22:11:01 2000
>Fix:
	
	Workaround: put . at end of $PATH, if present.
	Fix: I didn't look at that, I'm trying to make a crosscompiler to
	the VAX ;-)
>Audit-Trail:
>Unformatted: