This is the mail archive of the
mailing list for the Cygwin project.
Re: Potential problems with cygwin GCC and -mno-cygwin switch
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- To: Lapo Luchini <lapo at lapo dot it>
- Cc: cygwin at cygwin dot com
- Date: Tue, 08 Jan 2002 11:35:26 -0500
- Subject: Re: Potential problems with cygwin GCC and -mno-cygwin switch
- References: <3C3AD09D.CB010A7A@lapo.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
> with a
> 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:
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
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...
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html