On 12/15/2011 10:14 PM, Thomas Klausner wrote:
Indirect / recursive linking is no longer the default for ld starting with 2.22. Ld will stop with an error if it encounters a symbol not present in any of the listed libraries when previously it would have recursively searched libraries those libraries were linked to. The error is clear, and it says which library the symbol located. Something is using a libm function and libX11 function inOn Thu, Dec 15, 2011 at 06:52:35PM +0000, John Marino wrote:Module Name: pkgsrc Committed By: marino Date: Thu Dec 15 18:52:35 UTC 2011 Modified Files: pkgsrc/graphics/xzgv: Makefile Log Message: graphics/xzgv: Directly link libraries as required for default ld v2.22This adds: +LDFLAGS+= -lm -lX11 # explicitly list for ld v2.22 The package just includes gtk2/buildlink3.mk. I think that gtk2 can be built against different backends and libX11 is just one of them (think OS X). I have doubts that this change is correct (perhaps other similar ones as well). Why does Dragonfly ld 2.22 need this? Thomas
this particular case.As other platforms migrate to binutils 2.22 (likely Linux first), they are going to see this problem if it's not fixed. The alternative is to patch binutils ld to go back to the original behavior, but it's been changed for good (dependency hell)
reasons.Perhaps the logic for which libraries gets added to LDFLAGS needs to be platform specifically, but eliminating indirect linking probably is the correct thing to do.
DragonFly is just the first to notice. John