Using g++ and -m32 option on x86_64 broken

Corinna Vinschen
Wed Jul 1 08:29:00 GMT 2015

Hi Jeffrey,

On Jun 30 21:38, Jeffrey Walton wrote:
> Cygwin's GCC responds to the -m32 option, but it causes a compile error:
>    expected unqualified-id before ‘__int128’
>        inline __int128
> If the project does not support the -m32 option, then it should be
> removes so that using it causes a compile error.
> Below is the changed needed to get through the compile with -m32:
> $ diff /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/x86_64-pc-cygwin/bits/c++config.h
> /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/x86_64-pc-cygwin/bits/c++config.h.bu
> 1306,1308c1306
> < #ifndef __CYGWIN32__      /* -m32 used on x86_64 */
> < # define _GLIBCXX_USE_INT128 1
> < #endif
> ---
> > #define _GLIBCXX_USE_INT128 1
> ************

Wrong mailing list.  cygwin-patches is for patches to the Cygwin
sources, not patches to arbitrary packages in the Cygwin distro.

If you want to reach out to Cygwin package maintainers [GCC maintainer
BCCed], use the cygwin AT cygwin DOT com mailing list.  If you want to
report the bug to the GCC folks, see

> And this project really needs a bug tracker...

Since this is a GCC problem, it has:

As for -m32, it's not supported for a reason.  The link stage requires
to provide the 32 bit libs as part of a 64 bit install.  This is done on
Linux where the 32 bit stuff is in /usr/lib and the 64 bit stuff in
/usr/lib64, but we don't do that.  Both installations, 32 and 64 bit,
use /usr/lib.

What we do have is support for cross-compiling using a cross compiler
like i686-pc-cygwin-gcc on 64 bit Cygwin and x86_64-pc-cygwin on 32 bit

See the cross build packages who's names start with "cygwin32-" on 64
bit, "cygwin64-" on 32 bit.
This supported is limited though, because it only provides a limited set
of cross libs to link against.  It was mainly an effort to support
our package maintainers when we introduced 64 bit Cygwin.

If you need access to all 32 bit libs, build on 32 bit Cygwin.  If
you need access to all 64 bit libs, build on 64 bit Cygwin.

Alternatively we wouldn't be unhappy for a volunteer (especially given
how few volunteers we are) to provide more cross build packages to
support easy cross compiling on both platforms.  Having a working -m32
utilizing the cross build package path would be the icing on the cake.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <>

More information about the Cygwin-patches mailing list