[ANNOUNCEMENT] NEW: mingw-gcc-{core,g++,fortran,objc}-4.5.2-1

Charles Wilson cygwin@cwilson.fastmail.fm
Thu Jun 2 05:06:00 GMT 2011

The mingw-gcc packages provide the GNU Compiler Collection, configured
as a cross compiler for the MinGW (that is, i686-pc-mingw32) target.
The following languages are supported:
  C              mingw-gcc-core
  C++            mingw-gcc-g++
  Fortran        mingw-gcc-fortran
  ObjC/ObjC++    mingw-gcc-objc
It is hoped that this cross compiler will supplant the (deprecated)
gcc-3 -mno-cygwin mode, which suffered from various problems (such as
cygwin headers and libraries "leaking" into "native windows" apps
compiled using that mode).  This cross compiler does not suffer from
that issue, and is based on the 4.x series rather than the decade-old
3.x release series.

!!!! WARNING !!!!
IF you are attempting to update an existing cygwin installation, which
has the gcc-mingw 'add-on' packages installed (*), then you MUST
upgrade the gcc-mingw packages to version 20050522-3 or newer, before
installing this package.  Do NOT attempt to upgrade gcc-mingw and
install this package during the same setup.exe event. The reason for
this restriction is fairly complex, and is detailed here:

If you are reading this announcement AFTER having messed up your cygwin
installation, because you didn't follow these instructions or didn't
know about them, then see the section in this message
that begins with "HELP!!!" and follow the suggestions there to "fix" it.

(*) gcc-mingw packages are "add-ons" to the gcc-3 compiler suite, and
    provide the necessary files for the -mno-cygwin mode of that
    compiler.  Ideally, this MinGW cross compiler will supplant the old
    'gcc-3 -mno-cygwin' mode.

*** NOTE 1 ***
If you have installed the "missing" mingw cross compiler packages from 
then you need take no special action.  These packages will simply upgrade
the cygutils.fruitbat.org ones.

HOWEVER, note that the cygutils.fruitbat.org MinGW cross compiler was
based on gcc-4.5.1 rather than gcc-4.5.2, AND was compiled using the
--enable-fully-dynamic-string option.  This means that any C++
libraries you may have compiled using the cygutils.fruitbat.org mingw-gcc
package are NOT compatible with this version of the compiler.  Those C++
libraries must be recompiled with the new cross compiler.

*** NOTE 2 ***
In general, if you have an existing 'stack' of software compiled using
'gcc-3 -mno-cygwin', you will need to recompile it all using the new
cross compiler, because there is an ABI change between the 3.x and
4.x series.

*** NOTE 3 ***
This cross compiler is intended to be compatible with the MinGW.org
(native) win32 gcc.  As such, it is configured with the following


Most importantly, the use of --disable-sjlj-exceptions means that our
MinGW cross compiler (and MinGW.org's "native" compiler) use dw2
exception handling, rather than sjlj.  MOST other platforms' mingw
cross compilers (such as Fedora or Mandriva) seem to use sjlj instead.
Thus, products generated using those cross compilers are not compatible
with MinGW.org's compiler, while those generated using our cross
compiler ARE compatible.  However, the downside is that maintaining
compatibility with MinGW.org means we are INcompatible with Fedora and
Mandriva (etc) mingw cross compilers.

*** NOTE 4 ***
What's with all the cross compilers? Cygwin now has

  1. mingw64-i686-*   (that is, i686-w64-mingw32-*) stuff
  2. mingw64-x86_64-* (that is, x86_64-w64-mingw32-*) stuff
  3. mingw-*          (that is, i686-pc-mingw32-*) stuff

Well, all three provide gcc.  However, #1 and #2 use runtime libraries,
Win32 API import libraries, and Win32 API header files developed by the
mingw64.sf.net project.  #3 uses the same Win32 API import libraries and
header files that the cygwin project itself uses (these are maintained
by mingw.org), and uses the runtime libraries maintained by mingw.org.

Obviously, #2 supports 64bit targets, while #1 and #3 do not.

Finally, the mingw-i686 compiler uses dw2 exception handling. This tends
to be faster ('zero-cost') than the sjlj exception handling used by #1
and #2 use.  MinGW.org hopes that this will allow to provide java and
Ada environments that are NOT extremely slow -- but as of yet, they do
not support those languages.  Once they do...our MinGW (i686-pc-mingw32)
cross compiler will join them in supporting those languages.  OTOH, sjlj
is a requirement if you wish to catch exceptions that unwind through
'foreign frames' -- that is, you pass a callback function to a Win32 API
function, and expect to catch any exceptions it may throw, even though
those exceptions must unwind "through" the Win32 API (i.e. "foreign")
frame.  So, there are advantages and drawbacks to each approach:
mingw64.sf chose one way, MinGW.org chose the other.  Let a thousand
flowers bloom.

Charles Wilson


To update your installation, click on the "Install Cygwin now" link
on the http://cygwin.com/ web page.  This downloads setup.exe to
your system.  Then, run setup and answer all of the questions.


If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there.  It will be in the format:


If you need more information on unsubscribing, start reading here:


Please read *all* of the information on unsubscribing that is available
starting at this URL.

Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list