[Xlibs] Shared library support on Cygwin

Harold L Hunt II huntharo@msu.edu
Wed, 14 Jan 2004 00:23:36 -0500


Keith Packard wrote:

> Around 23 o'clock on Jan 13, Harold L Hunt II wrote:
> 
> 
>>`-no-undefined'
>>     Modern architectures allow us to create shared libraries with 
>>undefined symbols, provided those symbols are resolved (usually by the 
>>executable which loads the library) at runtime.
> 
> 
> The problem with Xlib is that it has undefined symbols which *aren't*
> resolved at run-time unless you happen to link your application with
> -lpthread (which only pthread-based multithreaded applications do).  I
> think this flag will cause problems in such environments, but I admit that
> I don't really know.

My understanding of the flag (and it is always an issue for Cygwin) is 
that it is only used in the following sort of test (and nowhere else):

if (broken_shared_libs) {
     really_build_shared = no_undefined && enable_shared;
} else {
     really_build_shared = enable_shared;
}

I do not believe that -no-undefined has any other effect.  Of course, we 
should consult a libtool guru, documentation, or the source to verify 
that this is correct.

Harold