This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: gcc -mno-cygwin finds the wrong include files


Hi Volker, Dave,

I see the same problem as Volker.  Interesting issue that Eric doesn't
see it. 


> --------snip--------
> ignoring nonexistent directory "/usr/local/include/mingw"
> ignoring duplicate directory "/usr/include/mingw"
> ignoring duplicate directory
> "/usr/i686-pc-mingw32/lib/../../include/w32api"
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/include
> --------snip--------

>   HEY!  WTF is that doing there?  THAT DOES NOT BELONG!

> --------snip--------
>  /usr/i686-pc-mingw32/include
>  /usr/include/w32api
> End of search list.
> --------snip--------

>   I noticed this rather peculiar entry in the specs file:

> --------snip--------
> *mingw_include_path:
> i686-pc-cygwin
> --------snip--------

> which looks wrong, but doesn't seem to be used anywhere.  However, I think
> the underlying cause is that cc1.exe most likely contains a hard-coded path
> to the target-dependent include dir, and since there's only one actual .exe
> serving as *both* target dependent compilers, there's one path there.

>   It might be possible to fix this by adding a -idirbefore option in the
> specs file, dependent on the -mno-cygwin switch, to add the correct
> i686-pc-mingw32/3.3.1/include directory earlier than the cygwin one.  Other
> fixes would work also.


Dave, thanks for the analysis, I want to release a new version as soon
as I have some spare time.  I'll try to verify that this is fixed with
the update.

BTW, in case of stddef.h and other std headers it would not hurt much
because the files are identical for Cygwin and MinGW, the only
difference between these two directories is actually this in the gcj
subdiretory: 

diff -urdN i686-pc-cygwin/3.3.1/include/gcj/libgcj-config.h i686-pc-mingw32/3.3.1/include/gcj/libgcj-config.h
--- i686-pc-cygwin/3.3.1/include/gcj/libgcj-config.h    2003-10-25 06:04:15.001000000 +0200
+++ i686-pc-mingw32/3.3.1/include/gcj/libgcj-config.h   2003-08-14 11:21:26.000000000 +0200
@@ -8,7 +8,7 @@
    included in user code.  */
 
 /* Define if hash synchronization is in use.  */
-/* #undef JV_HASH_SYNCHRONIZATION */
+#define JV_HASH_SYNCHRONIZATION 1
 
 /* Define if <inttypes.h> is available.  */
 #define JV_HAVE_INTTYPES_H 1



Gerrit
-- 
=^..^=                                     http://nyckelpiga.de/donate.html


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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]