Subject: different behaviour of system cc and TOOLDIR/cc
To: None <>
From: Matthias Drochner <>
List: tech-toolchain
Date: 06/06/2003 17:01:57
Hi -
just found a strange (or at least for me ununderstandable)
difference in behaviour of the USE_TOOLS and the maintree compilers:

When building a shared lib with the main one everything looks well:

$ cc -v -shared -o xxx.o
Using builtin specs.
gcc version 2.95.3 20010315 (release) (NetBSD nb4)
 ld -m elf_i386 -shared -o /usr/lib/crti.o /usr/lib/crtbeginS.o
xxx.o -lgcc_pic -lgcc_pic /usr/lib/crtendS.o /usr/lib/crtn.o

The same with "tools" doesn't work:

$ /usr/tools/bin/i386--netbsdelf-gcc -v -shared -o xxx.o
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 -sha
red -o crtbeginS.o -L/usr/tools/lib/gcc-lib/i386--netbsdelf/2.95
.3 -L/usr/tools/i386--netbsdelf/lib xxx.o crtendS.o
/usr/tools/i386--netbsdelf/bin/ld: cannot open crtbeginS.o: No such file
 or directory

Is this a bug or am I missing something?

best regards