Subject: misc/24204: src/x11/Xserver/hw/xfree86/xf86_os/Makefile fixes for amd64
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 01/23/2004 12:40:20
>Number:         24204
>Category:       misc
>Synopsis:       src/x11/Xserver/hw/xfree86/xf86_os/Makefile fixes for amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 23 11:41:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Nicolas Joly
>Release:        NetBSD 1.6ZH (-current 20040123)
>Organization:
	Institut Pasteur
>Environment:
System: NetBSD calimero.sis.pasteur.fr 1.6ZH NetBSD 1.6ZH (GENERIC.MP) #26: Thu Jan 22 10:09:51 CET 2004 njoly@calimero.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/GENERIC.MP amd64
Architecture: x86_64
Machine: amd64
>Description:
When building XFree with build.sh and MKX11=yes, PCI access is broken on
amd64 platform.

root@calimero [~]# scanpci
zsh: bus error (core dumped)  scanpci

`libxf86_os.a' build require some extra defines (shared with i386) :

	-DHAS_MTRR_BUILTIN -DUSE_I386_IOPL

>How-To-Repeat:
Build XFree with build.sh and MKX11=yes on amd64, and run scanpci.
>Fix:

Index: x11/Xserver/hw/xfree86/xf86_os/Makefile
===================================================================
RCS file: /cvsroot/src/x11/Xserver/hw/xfree86/xf86_os/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- x11/Xserver/hw/xfree86/xf86_os/Makefile	2004/01/19 00:36:09	1.2
+++ x11/Xserver/hw/xfree86/xf86_os/Makefile	2004/01/23 10:51:08
@@ -24,10 +24,10 @@
 SRCS.bsd+=	i386_video.c stdResource.c lnx_agp.c ioperm_noop.c
 .for _FN in ${SRCS.bsd}
 .if ${MACHINE} == "i386"
-CPPFLAGS.${_FN}+=	-DPCCONS_SUPPORT -DPCVT_SUPPORT -DHAS_APERTURE_DRV \
-			-DHAS_MTRR_BUILTIN -DUSE_I386_IOPL 
+CPPFLAGS.${_FN}+=	-DPCCONS_SUPPORT -DPCVT_SUPPORT -DHAS_APERTURE_DRV
 .endif
-CPPFLAGS.${_FN}+=	-DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
+CPPFLAGS.${_FN}+=	-DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC \
+			-DHAS_MTRR_BUILTIN -DUSE_I386_IOPL
 .endfor
 .endif
 
>Release-Note:
>Audit-Trail:
>Unformatted: