Quote Originally Posted by jamadagni View Post
Negative. See below.

I am aware of that. If libfoo.a contains goo.o and boo.o and the program doo which links to libfoo.a uses only what goo.o provides, then boo.o is not linked into doo.

But if there are many functions inside goo.o and the target doo uses only a few of them, the linker would add into the target even the unused functions. This is what I am trying to avoid. With the options I'm talking about, it won't add in the unused functions. man:gcc and man:ld confirm this statement.
Functions is one thing, methods is another. Is it able to strip methods from a class? If so, then fine.

Now my question remains: where can I give such options to the compiler when using qmake.
QMAKE_CXXFLAGS or QMAKE_LFLAGS depending on what component should receive them.