Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] Re: (PR#4041) bug: -fnative-struct deprecated in gcc 3.2
Home

[Freeciv-Dev] Re: (PR#4041) bug: -fnative-struct deprecated in gcc 3.2

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#4041) bug: -fnative-struct deprecated in gcc 3.2
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 20 Apr 2003 12:54:42 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, 20 Apr 2003, Per I. Mathisen wrote:
> > For mingw32 builds, -fnative-struct is added. However, this option is
> > deprecated in gcc versions 3.2 and newer and generates a hard error. For
> > these versions, you _must_ use -mms-bitfields instead. Stupid, but there
> > it is.
>
> Sorry, but that should be gcc 3.1.

And here is the fix that I'll commit. Note that only S1_14 has
-fnative-struct, it was removed in CVS HEAD. However, gtk needs it or the
newer variant. To make matters simple, I introduce -mms-bitfields into
CFLAGS whenever gtk2 client is compiled on Windows only, and since I don't
add any checks for old versions of gcc (they are unlikely in this
context), compiling gtk2 on Windows using mingw32 now requires gcc 3.1 or
later. I'll comit this fix right away.

Index: m4/gtk2-client.m4
===================================================================
RCS file: /home/freeciv/CVS/freeciv/m4/gtk2-client.m4,v
retrieving revision 1.2
diff -u -r1.2 gtk2-client.m4
--- m4/gtk2-client.m4   17 Apr 2003 03:13:46 -0000      1.2
+++ m4/gtk2-client.m4   20 Apr 2003 19:46:18 -0000
@@ -11,6 +11,10 @@
         client="gtk-2.0"
         CLIENT_CFLAGS="$GTK_CFLAGS -DGTK_DISABLE_DEPRECATED
-DGDK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"
         CLIENT_LIBS="$GTK_LIBS"
+        if test x"$MINGW32" = "xyes"; then
+          dnl Required to compile gtk2 on Windows platform
+          CFLAGS="$CFLAGS -mms-bitfields"
+        fi
       ],
       [
         FC_NO_CLIENT([gtk-2.0], [GTK+-2.0 libraries not found])




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