-mno-cygwin and avoiding bad includes [Re: odd 'configure' problems]

Mumit Khan khan@xraylith.wisc.EDU
Wed Jun 30 22:10:00 GMT 1999


On a different thread, I had written:
> 
> btw, I was perhaps a bit too harsh on -mno-cygwin, and possibly because
> I don't have a clean solution to the "picking up wrong header and lib"
> problem. One way of course is to use a combination of -nostdinc and
> -idirafter <...> when -mno-cygwin is specified in the specs file, and
> that might just work very well.
> 

Perhaps the following is one step closer to a real solution.  In the 
specs file, currently we have the following snippet that gets triggered
when you specify -mno-cygwin:
  
*cpp:
-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}   %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__}   %{mno-cygwin:-iwithprefixbefore ../../../../i586-cygwin32/include/mingw32 -D__MINGW32__=0.2}

If we replace this with the following, it may just do the job of hiding
all the Cygwin headers and pick up only the correct ones.

*cpp:
-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}   %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__}   %{mno-cygwin:-nostdinc -iwithprefixbefore ../../../../../include -iwithprefixbefore ../../../../i586-cygwin32/include/mingw32 -iwithprefixbefore ../egcs-2.91.57/include -D__MINGW32__=0.2}

For newer versions of egcs, use egcs-2.91.66 or whatever's appropriate 
instead of egcs-2.91.57 (corresponds to egcs-1.1 distributed with Cyg
b20.1) above. Apologies in advance for typos in the modified specs.

Any testers? Comments?

If this works and is acceptable, I'll submit a patch. We don't need
to hardcode the version number as I've done here, but get it via 
SUBTARGET_EXTRA_SPECS.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list