delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/17/22:51:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 17 Mar 2003 22:51:51 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: idea for mixed import/static libraries and linking with DLLs
Message-ID: <20030318035151.GA12616@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.5.1i

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019