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]

weird mingw -isystem and -iwithprefixbefore in cygnus "gcc/config/i386/cygwin.h"



Hi,

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


 At least the hard paths "/usr/include/mingw" in -isystem seem
suspects. The mingw/include is also quite strange. Neither point to
something useful if the installation dir is not standard.

 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. I thinks someone familiar with CPP and cygwin
directory organization could write the patch in one minute.  If I am
all right, then I would be incredibly happy to see this patch (private
mail copy welcome). Thanks in advance.

PS : good pointers to information on this subject are also 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]