tech-toolchain archive

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

Re: "Fixing" new ld(1) DT_NEEDED handling



On Fri, Oct 11, 2013 at 07:23:17PM -0400, Dennis Ferguson wrote:
> What about
> 
>       cc -Wall -Wl,--copy-dt-needed -static -O2 t1.c -lcurses

This fails, just like it did with older ld versions.

>  Hiding the actual library dependencies can be inconvenient, if you
> need to know them it is better if they are documented in the Makefile
> you already have.

Yes, there are pros and cons for the change the binutils guys did.

If i provide a library with a defined API I do not want clients to need to
know the internal organization. If I also provide a static lib, I'll probably
mix everyting into a single one, or always require the full set of static
libs to be linked in (no harm done with surplus libs in the static case).

But as seen in the curses vs. libterminfo case (and the tons of pkgs Roy
fixed in pkgsrc) this papers over bugs in makefiles as well.

For me it is not exactly clear that either behaviour could be called right and
the other wrong, but I prefer the old default for simplicity (and the linker
options are probably binutils specific). What do other linkers do?

Martin


Home | Main Index | Thread Index | Old Index