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

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, 13 Sep 2000 11:05:08 +0200 (MET DST)
From: Marc Herbert <Marc DOT Herbert AT inrialpes DOT fr>
Reply-To: Marc Herbert <Marc DOT Herbert AT inrialpes DOT fr>
To: cygwin AT sourceware DOT cygnus DOT com
cc: Hubert DOT Garavel AT inrialpes DOT fr, Radu DOT Mateescu AT inrialpes DOT fr
Subject: Re: weird mingw -isystem and -iwithprefixbefore in cygnus "gcc/config/i386/cygwin.h"
In-Reply-To: <Pine.SOL.3.94.1000906175335.29570G-100000@ubac.inrialpes.fr>
Message-ID: <Pine.SOL.3.94.1000913104410.24434P-100000@ubac.inrialpes.fr>
MIME-Version: 1.0

Here is a patch for this problem.


On Wed, 6 Sep 2000, Marc Herbert wrote:

> 
>  The option -mno-cygwin of cygwin/gcc 2.95.2 does not work anymore as
> soon as its installation is not 400% standard (ie when some base
> directory changes): it does not give priority to mingw headers
> anymore, but then wrongly includes cygwin headers first.
>  
> 
>  Why ? just have a look at line 98 in file gcc/config/i386/cygwin.h
> You'll see this :
> 
> 
>  #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
>   %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ -Dunix} \
>   %{!mno-win32:-D_WIN32 -DWINNT} \
>   %{mno-win32: %{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \
>   %{mno-cygwin:-DWIN32 -D__WIN32__ -D__MINGW32__=0.2 \
>     %{mthreads:-D_MT} \
>     -isystem /usr/include/mingw32 \
>     -isystem /usr/include/mingw \
>     -iwithprefixbefore ../../../../mingw/include/g++-3 \
>     -iwithprefixbefore ../../../../mingw/include }"
> 
> 
> 
>  I'd really like to give a patch, but unfortunately, I am no expert in
> CPP options, and I would surely invent something wrong.
> I quickly tried things like : 
> 
>   -iwithprefixbefore ../../../../i386-pc-cygwin32/include/mingw
> 
> But it does not work.


Finally it does work. We were at first confused by some parasite
obscure configurations problems, but in fact the solution I proposed
just above was the right one. 


Briefly :


 - the two options

     -iwithprefixbefore ../../../../mingw/include/g++-3
     -iwithprefixbefore ../../../../mingw/include 

 that you can find in the currently distributed gcc/config/i386/cygwin.h
 file make no sense at all, and should be deleted.


 - we successfully replaced them by these two options :

    -iwithprefixbefore ../../../../i386-pc-cygwin32/sys-include/mingw
    -iwithprefixbefore ../../../../i386-pc-cygwin32/include/mingw

Only one of the two options we propose is useful at a given time. But
the two may be useful, depending on how you installed mingw headers.

Comments on this patch welcome.


Sincerely,


-- 
Marc Herbert           | GIE Dyade (Bull/INRIA)
Marc DOT Herbert AT inria DOT fr  |   http://www.dyade.fr/
tel: +33 4 7661 5258   | VASY Project 
fax: +33 4 7661 5252   |   http://www.inrialpes.fr/vasy





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