This is the mail archive of the cygwin@sources.redhat.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: weird mingw -isystem and -iwithprefixbefore in cygnus "gcc/config/i386/cygwin.h"



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.Herbert@inria.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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]