Jine LDFLAGS pro staticke linkovani?

Ales Ledvinka xledvink na fi.muni.cz
Pondělí Srpen 11 17:43:56 CEST 2003


> Po pridani -lpthread na konec linkovaciho prikazu se to samozrejme sestavi
> v poradku. Akorat je mi divne, proc se to dynamicky slinkuje bez -lpthread.
mozna to osvetli tendle post:
http://www.cygwin.com/ml/libc-alpha/2003-04/msg00002.html

a mozna i tendle http://developer.apple.com/technotes/tn/tn1083.html :
"
Weak-Linking

An application can specify a library as being weak-linked. If a library is
weak-linked, the application will launch even if that library is not
available or can't be prepared due to memory constraints. Once a weak
library is missing, it stays missing until the application is
relaunched. Weak-linking is not a substitute for call-time binding of
imports. CFM only does prepare-time binding of imports. In order to use a
weak-linked library, we now need to determine if that library was
prepared.

An entire imported library may be marked weak, meaning that it can be
entirely missing. Individual imported symbols may also be marked weak,
which means they can individually be missing. Marking a library weak
implicitly marks all symbols from that library as weak.
"

> Druhy problem je, ze nevim jak tohleto rozumne zapsat
> do automake. Samozrejme jde do Makefile.am dat neco jako
> 
> 	program_static_LDADD = $(program_LDADD) -lpthread

> 	Jak byste tohle _ciste_ vyresili? Diky,
prepsanim Xek, aby se vytvarely popisny soubory pro libtool. ale ted
vazne. s automake si moc netykam.

AlL.

ps: mplayer to prenechava uzivateli, takze pokud chcete statickou binarku,
tak jde zadat ./configure --static="-ldl -lpthread ..." rek bych, ze je to
asi nejpeknejsi reseni hned po automatickych detekcich znamych pripadu v
configure skriptu.



Další informace o konferenci Linux