delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/08/11:35:05

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
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3C3B1FCE.6030005@ece.gatech.edu>
Date: Tue, 08 Jan 2002 11:35:26 -0500
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Lapo Luchini <lapo AT lapo DOT it>
CC: cygwin AT cygwin DOT com
Subject: Re: Potential problems with cygwin GCC and -mno-cygwin switch
References: <3C3AD09D DOT CB010A7A AT lapo DOT it>

Lapo Luchini wrote:

>>Yeah, and we can kiss that pesky "UNIX emulation" claim of cygwin's
>>goodbye, too.  Somehow, I don't think that you'll find many library
>>files in /usr/lib/cygwin on, say, HP/UX, Linux, Tru64, etc.
>>
>>This method solves a "problem" for -mno-cygwin at the expense of
>>impacting many other packages.
>>
>>I agree that the print-search-dirs should work correctly and even suggested
>>this in the libtools forum.  I agree that --dll-search-prefix=cyg should
>>not be activated when the user specifies -mno-cygwin.
>>
>>
> OK, maybe part of Jon's idea was bad or "not correct", but what about
> replacing just that
>   --dll-search-prefix=cyg
> with a
>   %{!mno-cygwin:--dll-search-prefix=cyg}
> in the distro?
> 
> If I understood it right this whould be a problem solver with no side
> effects, right?


Except that it doesn't really solve any problems that currently exist -- 
only potential ones.  I'll explain below.

I agree that you SHOULD have %(!mno-cygwin:--dll-search-prefix=cyg).  If 
the mingw folks would condescend to actually USE the search prefix 
feature I laboriously added to binutils -- at thier request -- and name 
their DLLs with a prefix other than 'lib' it would truly be nice.  And 
then you'd also put %(mno-cygwin:--dll-search-prefix=mgw) or something.

And Paul Sokolovsky could use --dll-search-prefix=pw.  But I digress.

dll-search-prefix only has effect when you are trying to link directly 
to a DLL.  Ordinarily, you don't do that -- you link with import libs. 
Which are named 'libfoo.dll.a'.  Really, to link to a DLL, in practice 
you have to:
   -L/usr/bin -lfoo

Since there aren't any import libs in /usr/bin, when ld fails to find 
libfoo.dll.a THEN it will search for cygfoo.dll.  (Actually, I'm 
glossing over some other items in the search procedure -- use the 
source, luke)

Do you currently add -L/usr/bin when linking?  No, I didn't think so -- 
therefore --dll-search-prefix can't really be causing any problems. 
Unless you've got DLLs scattered around elsewhere...

--Chuck




--
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