Subject: Re: different behaviour of system cc and TOOLDIR/cc
To: Jason Thorpe <>
From: Matthias Drochner <>
List: tech-toolchain
Date: 06/06/2003 22:48:33 said:
> Since the toolchain compiler is (potentially) a cross compiler, you
> really don't want it searching in the base system.

Hmm - isn't this what the -nostdlib flag is for?

It shouldn't use anything of the base system unless directed
by -L or so, agreed. However these crt* files have a strange
status somehow - they don't belong to the target system, otherwise
they should be found by -L${DESTDIR}, but they also are not
part of the toolchain, otherwise they should reside in ${TOOLDOR}/... said:
> Whenever you use the TOOLDIR gcc, you basically need to do the
> -nostdlib dance and specifiy the libraries/crt files manually, just as
>  <bsd.*.mk> do. 

OK, but this is somehow unsatisfying because information
is duplicated: The *.mk files have to know which crt* files
are to be linked in, in addition to the compiler's specs.

What I'm trying to get solved is that shared libraries are
not linked against libgcc_pic.a if <> is used.
Just using ${CC} instead of ${LD} to build the lib works,
but only as long as USETOOLS==no.
Would be easily solved by wiring -lgcc_pic into,
but I'd consider this ugly for the readons mentioned.
And there might be issues wrt a gcc-3 migration...

best regards