Patryk Zawadzki wrote in http://bugzilla.gnome.org/show_bug.cgi?id=528582: > I am not sure if you are familiar with gcc4's --as-needed switch. Sorry if you > know all this: > > --as-needed causes the linker to check each linked library for symbols used in > the object files. If there are none then the library is dropped and the > resulting binary does not link to it. This is very useful as most projects > specify only one set of libraries for all the binaries they produce. This > results in uneeded dependencies in some of them. > > On the other hand when a project forgets to specify all the direct dependencies > it can happen that without --as-needed one of the linked libraries accidentally > pulls all the missing deps and linking works fine (in your case some other > library pulls the libm dependency while it should not). After recompiling the > library with --as-needed the libm dependency will go away and planner fails to > link with unresolved symbols. > > In any case if a project uses symbols from a particular library it should > explicitly link against it, not depending on some other library pulling the > necessary dependencies and this is what the above patch does. Yes, I know, but I was expecting my build to fail as well when using --as-needed. However, I tried your command line and it worked fine. I noticed that for some reason -lm is added anyway, but I've been unable to locate any library that caused it. And even if there is such a library, why would this not happen on your system? Maurice. -- Maurice van der Pot Gentoo Linux Developer griffon26 gentoo org http://www.gentoo.org Gnome Planner Developer griffon26 kfk4ever com http://live.gnome.org/Planner
Attachment:
pgp96gl2GEGEY.pgp
Description: PGP signature