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: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8651) Cygwin gtk client build requires -mms-bitfields
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Sun, 2 May 2004 07:15:40 -0700
Reply-to: rt@xxxxxxxxxxx

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

Per Inge Mathisen 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"?

  There seems to be some kind of mingw test for compiling win32 -client. 
Even if it seems to get it's information from host_os set by 
aforementioned config.guess, I tested:

 > mkdir fciv_build_win32_client
 > cd fciv_build_win32_client
 > ../freeciv_src/autogen.sh --enable-client=win32
...
configure: error: specified client 'win32' not configurable (mingw32 is 
needed)

>>I have no idea how to cleanly check need for '-mms-bitfields' in
>>configure.
> 
> 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.

> 
>>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.0 versions 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'.

  I tried to test gcc-2.95.3:

 > mkdir fciv_build_gcc295
 > cd fciv_build_gcc295
 > BASEPATH=$PATH
 > export PATH=/usr/bin/gcc2:$BASEPATH
 > hash -r
 > export CFLAGS="-fnative-struct"
 > ../freeciv_src/autogen.sh
 > make

  But this seemed to fail on error not likely to be cygwin specific, but 
to fail gcc-2.95 on other platforms as well.


  - Caz




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