[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force X.Org X11 SVN commit: r348 - in trunk/debian: . patches



Author: dnusinow
Date: 2005-07-15 14:48:27 -0500 (Fri, 15 Jul 2005)
New Revision: 348

Added:
   trunk/debian/patches/030_libvgahw_gcc4_volatile_fix.diff
Modified:
   trunk/debian/changelog
Log:
- Add 030_libvgahw_gcc4_volatile_fix.diff to work around libvgahw.a gcc4
  breakages. Thanks David Mart?\195?\173nez Moreno and Paul Hampson.
  Closes: #318218, #318231, #318271, #318405


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2005-07-15 18:51:51 UTC (rev 347)
+++ trunk/debian/changelog	2005-07-15 19:48:27 UTC (rev 348)
@@ -9,6 +9,9 @@
        Martínez Moreno)
      - Update Danish debconf translations. Thanks to Claus Hindsgaul; 
        Closes: #318227
+     - Add 030_libvgahw_gcc4_volatile_fix.diff to work around libvgahw.a gcc4
+       breakages. Thanks David Martínez Moreno and Paul Hampson.
+       Closes: #318218, #318231, #318271, #318405
 
    * Changes by Daniel Stone:
      - Fix S/390 build by bringing MANIFEST and *.install.s390 files up to

Added: trunk/debian/patches/030_libvgahw_gcc4_volatile_fix.diff
===================================================================
--- trunk/debian/patches/030_libvgahw_gcc4_volatile_fix.diff	2005-07-15 18:51:51 UTC (rev 347)
+++ trunk/debian/patches/030_libvgahw_gcc4_volatile_fix.diff	2005-07-15 19:48:27 UTC (rev 348)
@@ -0,0 +1,25 @@
+gcc4 has issues with libvgahw.a. This patch is a workaround stolen from
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161242 (by Olivier
+Baudron). See also Debian #318218 and bugs merged to it
+
+diff -ruN xc-old/programs/Xserver/hw/xfree86/vgahw/vgaHW.c xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c
+--- xc-old/programs/Xserver/hw/xfree86/vgahw/vgaHW.c	2005-05-08 23:23:09.000000000 -0400
++++ xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c	2005-07-15 15:09:29.000000000 -0400
+@@ -441,12 +441,16 @@
+ static CARD8
+ mmioReadAttr(vgaHWPtr hwp, CARD8 index)
+ {
++    volatile CARD8 tmp;
++  
+     if (hwp->paletteEnabled)
+ 	index &= ~0x20;
+     else
+ 	index |= 0x20;
+ 
+-    (void) minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET);
++	/* gcc-4.0 -O2 is broken : needs a volatile assignment */ 
++	tmp = minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET);
++
+     moutb(VGA_ATTR_INDEX, index);
+     return minb(VGA_ATTR_DATA_R);
+ }



Reply to: