[i386] Why g++ _always_ link an executable with libm.so?
Andrew Pinski
pinskia@physics.uc.edu
Wed Jan 5 18:47:00 GMT 2005
On Jan 5, 2005, at 12:14 PM, Mike Hearn wrote:
> On Tue, 04 Jan 2005 18:06:51 -0500, Andrew Pinski wrote:
>> Then write a better collect2 which only links in the libraries which
>> are needed and have it find the needed libraries without supplying
>> the option to link the library (yes this is on the TODO page of gcc).
>
> I thought there was already an option for this in ld, --as-needed or
> something.
Well then make binutils change over --as-needed to be default.
> I also find it strange (broken) that a c++ app that doesn't use any
> libm
> symbols is linked to it anyway. Why does it matter?
because libstdc++ might pull in libm symbols without the person knowing
he did.
-- Pinski
More information about the Gcc
mailing list