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

Andrew Pinski <[email protected]>
Newsgroups gmane.linux.gcc,gmane.comp.gcc.devel
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

-
To unsubscribe from this list: send the line "unsubscribe linux-gcc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.