Re: [i386] Why g++ _always_ link an executable with libm.so?
Andrew Pinski <[email protected]> Wed, 5 Jan 2005 17:30:46 -0500
| Newsgroups | org.kernel.vger.linux-gcc |
|---|---|
| Message-ID | <[email protected]> |
On Jan 5, 2005, at 5:25 PM, Denis Zaitsev wrote: > But then another question: if libstdc++ itself has libm in its NEEDED > list, why the whole app having libstdc++ in its NEEDED list is forced > (by the linker?) to have libm there too? While the app itself never > really needs that libm? Because that is not the way it should work. If it works that way it is just plainly wrong really. All libraries which are needed by a shared library should be listed, otherwise you get undefined behavior on when libraries get initialized. This has been discussed before, go look it up. -- Pinski