[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Base X11 libraries cleanup



Hi.

On Fri, 30 Jun 2006 09:23:20 +0200, Hans de Goede wrote:

> How about using ld --as-needed, AFAIK that has come up before and
> would be a great improvement!

In the few cases that I've tried it it simply did not work as adveritsed
(or maybe I misunderstood it's purpose).

To wit:

> cat > test.c <<EOF
#include <stdio.h>

int main(int argc, char** argv) {

    fprintf(stdout, "This is a test\n");

    return 0;
}
EOF

> gcc -o test.o -c test.c
> gcc -o test -lxml2 -Wl,--as-needed test.o
> ldd -r -u ./test
Unused direct dependencies:

        /usr/lib/libxml2.so.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]