Subject: Re: ld(1) bug needs fixing or USE_NEW_TOOLCHAIN turned off.
To: Frank van der Linden <>
From: Todd Vierling <>
List: tech-toolchain
Date: 10/02/2001 11:41:12
On Tue, 2 Oct 2001, Frank van der Linden wrote:

: 	* The script that generates the target emul.c file (eelf_i386.c)
: 	  is in gnu/dist/toolchain/ld/emultempl/elf32.em
: 	  Around line 635 of that file, it will emit some code to
: 	  search for DT_NEEDED libraries in rpath and some other places
: 	  (in addition to the rpath-link search). However, this piece
: 	  of code will only be generated if:
: 	  if [ "x${host}" = "x${target}" ] ; then
: 	  It turns out that ${host} is set to "none" and ${target}
: 	  is set to "i386-unknown-netbsdelf". The linker thinks
: 	  it's a crosslinker, and does not emit that code. However,
: 	  it's clearly needed for a native linker.

Right.  I have a fix I'm testing right now.  Just telling ld to treat it as
a native linker isn't right either, because it ends up pulling in other
(generic)  things that are definitely not appropriate.

-- Todd Vierling <>  *  Wasabi NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support --