Using g++ and -m32 option on x86_64 broken

Corinna Vinschen corinna-cygwin@cygwin.com
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.
See https://cygwin.com/lists.html

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 https://gcc.gnu.org/bugs/

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

Since this is a GCC problem, it has:

  https://gcc.gnu.org/bugzilla/

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
Cygwin.

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.


Thanks,
Corinna

-- 
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: <http://cygwin.com/pipermail/cygwin-patches/attachments/20150701/f785f35f/attachment.sig>


More information about the Cygwin-patches mailing list