Re: [i386] Why g++ _always_ link an executable with libm.so?
Denis Zaitsev <[email protected]> Wed, 5 Jan 2005 04:16:06 +0500
| Newsgroups | org.kernel.vger.linux-gcc |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jan 04, 2005 at 06:06:51PM -0500, Andrew Pinski wrote: > > On Jan 4, 2005, at 5:59 PM, Denis Zaitsev wrote: > > > Ok, but do we force users to use libm every time libc is used? No, we > > don't. Of course, we don't. And I emphasised the word 'always': > > not _every_ routine from libstdc++ need libm, but it always > > required... > > 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). > > Also note on some targets like darwin, libm is included in libsystem > (aka > libc) by default. Ok, I'm not trying to criticize the way it implemented for now. I'm trying to understand what happens now.