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]

Re: Does -mno-cygwin sometimes have no effect?


On Wed, Jul 11, 2001 at 04:56:37PM -0700, Deneb Meketa wrote:
>It seems to me that when I use the -mno-cygwin option to gcc, this has
>the intended effect (no dependency on cygwin1.dll) most of the time,
>but in situations where certain additional cygwin libs are needed (in
>my case, cygintl.dll), -mno-cygwin doesn't do anything; the output exe
>always requires cygwin libs.
>
>Is this correct?  This would make sense if there is no Windows
>equivalent to something like cygintl.dll.  However, if this is in fact
>the case, I would love a warning from gcc indicating that honoring
>-mno-cygwin will not be possible.

If you use something that relies on cygwin, you will need the cygwin
dll.  Any DLL that is not built with -mno-cygwin will need the
cygwin dll.

I can't think of any easy way to figure out from an import library
that the dll you're linking uses the cygwin DLL.  Don't you actually
have to go out of your way to specifically load the libraries?  I
thought that I'd isolated the link library directories so that
specifying '-mno-cygwin -lintl' wouldn't work if there was no libintl.a
file available in /usr/lib/mingw32.  However, I'm not near a system
where I can test this right now, so I don't know for sure.

Even if there was an easy way to detect this scenario, I think that
adding the detection to ld would be a lot of work.  ld doesn't
understand the -mno-cygwin option.  That's a gcc option.

This is not something that I'm interested in doing.  I don't know if
anyone else wants to take a stab at it.  I can't guarantee that a
patch would be accepted by the binutils PE maintainer (DJ), however.
I suspect that it could be pretty intrusive in bfd/ld.

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]