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

Patch for the libvgahw.a bug (#318231 and others).



	Please, could someone with SVN access add this patch to the current tree?

============================
Patch submitted to RedHat bugzilla #161242 by Olivier Baudron.

Works around/fixes primary gcc bug:
        http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22278

--- xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c.libvgahw-workaround-rh161242   2005-07-12 12:44:35.000000000 -0400
+++ xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c        2005-07-12 12:47:41.000000000 -0400
@@ -441,12 +441,15 @@
 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);
 }

============================
-- 
I once farted on the set of Blue Lagoon.
		-- Brooke Shields (South Park).
--
Debian developer

Attachment: pgpJnMnulZTtu.pgp
Description: PGP signature


Reply to: