This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

idea for mixed import/static libraries and linking with DLLs


I just realized that libc.so on linux is just a linker script and
that it is used to link both the shared and static parts of libc.

So, in a similar vein, you could conceivably do something like this
on cygwin:

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
GROUP ( /bin/cygwin1.dll /usr/lib/libcygwin_static.a )

I just renamed my libcygwin.a to libcygwin_static.a and copied
the above to libcygwin.a.  It worked fine.

So, if I wanted, I could just produce this script, generate only
a libcygwin_static.a and everything would work ok without any
changes to gcc's spec file.

Apologies if this approach has already been mentioned.  I thought
it was kinda neat.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]