tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ld --as-needed (math/gnumeric110 has unnecessary dependencies)

 >> According to upstream's website, (at least) lib{bonobo{,ui},gnomeui}
 >> and ORBit2 are not needed. Attached patch seems to work well for
 >> me; no build- or run-time errors occur. It would be nice if someone
 >> could double-check and/or commit this or something similar.

> Thanks, good catch -- committed and PKGREVISION bumped.
>  Thomas

Adding --as-needed option to the GNU linker may allow to detect this
kind of problems automatically at bulk build time. Thoughts?

0 ~>cat my.c                                                                    
#include <stdio.h>

void five (void);

void five (void)
        printf ("5\n");

0 ~>gcc -DPIC -fPIC -shared -o my.c -lcompat -lutil -lm

0 ~>gcc -DPIC -fPIC -Wl,--as-needed -shared -o my.c -lcompat -lutil 

0 ~>ldd ./
        -lutil.7 => /usr/lib/
        -lc.12 => /usr/lib/
        -lm.0 => /usr/lib/

0 ~>ldd ./
        -lc.12 => /usr/lib/

0 ~>

Best regards, Aleksey Cheusov.

Home | Main Index | Thread Index | Old Index