This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [i386] Why g++ _always_ link an executable with libm.so?



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]