delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/12/01:59:42

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
Date: Wed, 11 Jul 2001 23:13:06 -0400
From: Christopher Faylor <cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Does -mno-cygwin sometimes have no effect?
Message-ID: <20010711231306.D1501@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <E97DAEEFD08EA744B0624B6DD315E6A7031BB1B1 AT ex-600town-01 DOT macromedia DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <E97DAEEFD08EA744B0624B6DD315E6A7031BB1B1@ex-600town-01.macromedia.com>; from dmeketa@macromedia.com on Wed, Jul 11, 2001 at 04:56:37PM -0700

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/

- Raw text -


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