Module Name:    src
Committed By:   apb
Date:           Sun Nov 18 08:24:02 UTC 2012

Modified Files:
        src/external/mit/xorg/server/drivers/xf86-video-xgi: Makefile

Log Message:
Use -Wno-array-bounds when building two files that read past the end of
an array.  It's not clear how to fix the real bug.  This hack allows
the build to complete with clang.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
    src/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile:1.1 src/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile:1.2
--- src/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile:1.1	Thu Jul 19 19:21:50 2012
+++ src/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile	Sun Nov 18 08:24:02 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2012/07/19 19:21:50 macallan Exp $
+#	$NetBSD: Makefile,v 1.2 2012/11/18 08:24:02 apb Exp $
 
 DRIVER=		xf86-video-xgi
 DRIVER_NAME=	xgi_drv
@@ -16,4 +16,19 @@ CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}/libd
 # for now, I'd like to see this thing work first
 CPPFLAGS+=	-DHAVE_UNISTD_H -Wno-deprecated-declarations
 
+# vb_struct.h contains this declaration:
+#
+#	typedef struct _XGI_CRT1TableStruct
+#	{
+#	  UCHAR CR[15];
+#	} XGI_CRT1TableStruct;
+#
+# but code in init.c and vb_setmode.c reads elements beyond the end of
+# the array and writes the result into hardware registers.  It's not
+# clear how to fix this, so just disable the -Warray-bounds warning to
+# allow the build to complete.
+#
+COPTS.init.c=          -Wno-array-bounds
+COPTS.vb_setmode.c=    -Wno-array-bounds
+
 .include "../Makefile.xf86-driver"

Reply via email to