Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8651) Cygwin gtk client build requires -mms-bitfie
Home

[Freeciv-Dev] Re: (PR#8651) Cygwin gtk client build requires -mms-bitfie

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: marko.lindqvist@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8651) Cygwin gtk client build requires -mms-bitfields
From: "Per Inge Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 2 May 2004 07:28:22 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8651 >

On Sun, 2 May 2004, Marko Lindqvist wrote:
> > autoconf should use -mmbs-bitfields if it detects cygwin/mingw. Does
> > autoconf detect mingw for you? (Do you even use mingw in cygwin?)
> >
>
> You mean what config.guess says? "i686-pc-cygwin"
> Is there any other way autoconf "detects mingw"?

Ah. In m4/gtk2-client.m4:

        if test x"$MINGW32" = "xyes"; then
          dnl Required to compile gtk2 on Windows platform
          CFLAGS="$CFLAGS -mms-bitfields"
          CLIENT_LDFLAGS="$LDFLAGS -mwindows"
        fi

This should be changed to a check for _either_ mingw or cygwin host
result. Now we just check for mingw. The same goes for similar checks in
configure.ac|in.

> > I think we should check for cygwin/mingw, and add it if they are found.
>
> That's simple solution. Even if some validity goes to saying "autoconf
> should make checks based on available/required features, not on
> platform", I guess we can take shortcut here.

Yes, win32 needs to be treated as an exception here. autoconf is a unixy
tool that works well only on unixy platforms.

> >>And if we are to support pre 3.0 gcc, we need to use
> >>'-fnative-struct' instead. (AFAIK neither works for both gcc 2.x and 3.x)
> >
> > A decision was made to not support pre-3.0versions of gcc on the win32
> > platform.
>
> Ok... or maybe not exactly. There is probably difference between
> "nonsupporting" and "knowingly breaking (for no obvious gains)". If
> gcc-2.x currently works, we should not choke it by always feeding
> parameter '-mms-bitfields' to cygwin compiler.
> I'd suggest that we make first generic test to detect if compiler
> supports '-mms-bitfields' and later check if platform is cygwin _and_
> first check was succesful, before adding '-mms-bitfields'.

Feel free. But I think it is an utter waste of time. Useful versions of
mingw/cygwin have gcc3.

  - Per




[Prev in Thread] Current Thread [Next in Thread]