Subject: Re: different behaviour of system cc and TOOLDIR/cc
To: Todd Vierling <>
From: Matthias Drochner <>
List: tech-toolchain
Date: 06/10/2003 19:00:06 said:
> This is because src/tools/toolchain was created specifically for
> compiling the NetBSD tree -- i.e. it *assumes* that you will be
> specifying where to get the files from /usr/lib via a -B option.

When I try this:

/usr/tools/bin/i386--netbsdelf-gcc -v -Wl,-nostdlib -B/usr/lib  -Wl,-x
 -shared -Wl,-soname -Wl, -o  -Wl,--whole-a
rchive libtest_pic.a  -Wl,--no-whole-archive -lstdc++  -L/usr/lib -L/u
sr/lib  -Wl,-R/usr/lib -Wl,-R/usr/lib
Reading specs from /usr/tools/lib/gcc-lib/i386--netbsdelf/2.95.3/specs
gcc version 2.95.3 20010315 (release) (NetBSD nb4)
 /usr/tools/lib/gcc-lib/i386--netbsdelf/2.95.3/collect2 -m elf_i386 -s
hared -o crtbeginS.o -L/usr/lib -L/usr/lib -L/usr/tools
/lib/gcc-lib/i386--netbsdelf/2.95.3 -L/usr/tools/i386--netbsdelf/lib -
nostdlib -x -soname --whole-archive libtest_pic.a --no-wh
ole-archive -lstdc++ -R/usr/lib -R/usr/lib crtendS.o
/usr/tools/i386--netbsdelf/bin/ld: cannot open crtbeginS.o: No such fi
le or directory
collect2: ld returned 1 exit status
i386--netbsdelf-gcc: file path prefix `/usr/lib' never used
*** Error code 1

/usr/lib/crtbeginS.o exists...

best regards