delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/10/13:24:21

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <39BBC382.4A2E53E3@ece.gatech.edu>
Date: Sun, 10 Sep 2000 13:23:14 -0400
From: "Charles S. Wilson" <cwilson AT ece DOT gatech DOT edu>
X-Mailer: Mozilla 4.75 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: "Gary V. Vaughan" <gvv AT techie DOT com>
CC: cygwin AT sources DOT redhat DOT com
Subject: Re: libtool
References: <20000907133430 DOT 25505 DOT qmail AT web119 DOT yahoomail DOT com> <20000907185550 DOT O7695 AT demon DOT co DOT uk> <20000908012740 DOT A26790 AT demon DOT co DOT uk>

I don't believe the following behavior is possible in the current
libtool. However, if it is, please correct me.

In the upcoming libtool (1.4?) it would be nice on cygwin/windows-ish
platforms, if the libfoo.la file could instruct libtool that it may need
different -Ddefines when compiling an object file that is to be linked
to a static lib or to a dynamic lib (dll).

For instance, on cygwin, if compiling/linking my-file.c and I want to
link to libz statically, I need the following (when compiling/linking by
hand, no libtool):

gcc -c -DZLIB_STATIC -o my-file.o myfile.c
gcc -static -o my-file.exe my-file.o -L<path> -lz

If I want to link dynamically, I need:

gcc -c -o my-file.o myfile.c
gcc -o my-file.exe my-file.o -L<path> -lz

That is, both the compile and the link steps are different.  Is it
possible for this information to be embedded in libfoo.la (libz.la in
this case) -- so that libtool knows that 'statically linked packages
that depend on libz must have -DZLIB_STATIC in the compile step', while
'dynamically linked packages that depend on libz need no special
-Ddefines in the compile step'.

Similarly, you need -DPNG_STATIC for libpng, -DJPEG_STATIC for libjpeg,
etc...

--Chuck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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