Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199906152233.RAA11733@mercury.xraylith.wisc.edu> To: cygwin AT sourceware DOT cygnus DOT com Subject: -mno-cygwin and avoiding bad includes [Re: odd 'configure' problems] In-Reply-To: Your message of "Tue, 15 Jun 1999 16:39:06 CDT." <199906152139 DOT QAA11604 AT mercury DOT xraylith DOT wisc DOT edu> Date: Tue, 15 Jun 1999 17:33:35 -0500 From: Mumit Khan 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 AT sourceware DOT cygnus DOT com