gcc -mno-cygwin creates cygwin executables!

Teun Burgers a.rburgers@freeler.nl
Wed Dec 12 13:10:00 GMT 2001

egor duda wrote:

> you're fixing specific symptoms instead of the problem itself. this
> had been discussed already and the general consensus (at least as i
> understand it) is the following: -mno-cygwin is a _hack_. it's
> supposed to be used only when absolutely necessary and when you
> absolutely know what you're doing.

-mno-cygwin certainly is very good hack. I hoped I was contributing
to making it an even better hack.

> *** if you want to build executables for mingw platform you should use
> mingw toolchain, either native or cross. ***

setup.exe is a huge success
of cause and makes things very easy to install. I have never looked at
the mingw toolchain, but I bet the cygwin stuff is a lot easier to

And with a bit of attention paid to the configure script a package can
out-of-the box with gcc -mno-cygwin. This is much better than the often
ill maintained mingw specific makefiles, if they are there at all.

> you don't suppose cygwin gcc to have -msolaris or -mdjgpp options, do
> you? i believe mingw is no different.

-msolaris not, since you can buy a solaris box. djgpp comes with
a bash port and so you can run configure scripts on djgpp natively.
No need for -mdjgpp, though it would be nice to have that :)
I am not aware of a bash port for mingw. So for configure scripts
you need cygwin as host.

> the reason -mno-cygwin still exists in official cygwin gcc is that
> cygwin contains several utilities that should not depend on
> cygwin1.dll (setup, cygcheck, strace). those utilities are built with
> -mno-cygwin and people maintaining them take special care to make sure
> libcygwin.a won't creep in.

I would certainly hope that gcc -mno-cygwin is developed further. For
thing it would be nice if mingw libraries (as available at
could be installed through setup.exe.

Teun Burgers

Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list