Subject: re: USE_NEW_TOOLCHAIN explosion in gnu/lib/libgcc
To: None <sommerfeld@netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: tech-toolchain
Date: 10/04/2001 18:56:31
   /usr/tool/bin/i386--netbsdelf-gcc -O2  -Werror -I/usr/src/gnu/lib/libgcc/../..\
   /usr.bin/gcc/arch/i386 -I/usr/src/gnu/lib/libgcc/../../dist/toolchain/gcc/cp/inc\
    -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I/usr/src/gnu/lib/libgcc/../..\
   /dist/toolchain/gcc -I/usr/src/gnu/lib/libgcc/../../dist/toolchain/gcc/config -I\
    /usr/src/gnu/lib/libgcc/../../dist/toolchain/gcc/../include -nostdinc -idirafter\
    /usr/include -c -o exception.o /usr/src/gnu/lib/libgcc/../../dist/toolchain/gcc\
   /cp/exception.cc /usr/src/gnu/lib/libgcc/../../dist/gcc/cp/exception.cc
   i386--netbsdelf-gcc: cannot specify -o with -c or -S and multiple compilations
   *** Error code 1
   
   exceptions.cc turns up in both SRCS in that directory and in the "this
   file is automatically generated, do not edit" i386.mk file.
   
   Deleting exceptions.cc from the SRCS+= .. in gnu/lib/libgcc fixed it
   for me.



has anyone tracked down the ultimate cause of this?  i *seem* to recall
that `make cleandir' doesn't, so the .depend file isn't removed, so you
are left with old (gnu/dist/gcc) paths in .depend, and new (gnu/dist/
toolchain/gcc) paths generated from Makefile/.PATH.  but i couldn't
work out why the .depend was left alone by cleandir.

FWIW, the "fix" above means that you'll build the wrong exception.cc.