Subject: xsrc/25171: X server fixes to use loadable modules on amd64 (src/x11 part)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 04/13/2004 23:08:44
>Number: 25171
>Category: xsrc
>Synopsis: X server fixes to use loadable modules on amd64 (src/x11 part)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: xsrc-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Apr 13 21:09:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Nicolas Joly
>Release: NetBSD 2.0C (-current 20040413)
>Organization:
Institut Pasteur
>Environment:
System: NetBSD lanfeust.sis.pasteur.fr 2.0C NetBSD 2.0C (LANFEUST) #0: Fri Apr 9 10:21:40 CEST 2004 njoly@lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/LANFEUST amd64
Architecture: x86_64
Machine: amd64
>Description:
Dynamic X server, built from src/x11, crash on amd64 while trying to load
modules.
Duplicate of xsrc/25025, but depends on xsrc/25170 (xsrc fixes).
>How-To-Repeat:
X -configure
>Fix:
Index: share/mk/bsd.x11.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.x11.mk,v
retrieving revision 1.38
diff -u -r1.38 bsd.x11.mk
--- share/mk/bsd.x11.mk 27 Mar 2004 20:16:16 -0000 1.38
+++ share/mk/bsd.x11.mk 13 Apr 2004 20:51:40 -0000
@@ -97,6 +97,10 @@
CPPFLAGS+= -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO
CPPFLAGS+= -I${DESTDIR}${X11INCDIR}
+.if ${MACHINE} == "amd64"
+CPPFLAGS+= -D__AMD64__
+.endif
+
LDFLAGS+= -Wl,-rpath-link,${DESTDIR}${X11USRLIBDIR} \
-R${X11USRLIBDIR} \
-L${DESTDIR}${X11USRLIBDIR}
Index: x11/Xserver/hw/xfree86/loader/Makefile
===================================================================
RCS file: /cvsroot/src/x11/Xserver/hw/xfree86/loader/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- x11/Xserver/hw/xfree86/loader/Makefile 6 Mar 2004 03:31:08 -0000 1.3
+++ x11/Xserver/hw/xfree86/loader/Makefile 13 Apr 2004 20:51:41 -0000
@@ -34,6 +34,10 @@
CPPFLAGS+= ${X11FLAGS.OS_DEFINES} -DDLOPEN_SUPPORT -DHAS_SHM \
-DFONTENC_COMPATIBILITY -DXFree86LOADER -DFONTCACHE
+.if ${MACHINE} == "amd64"
+CPPFLAGS+= -DUseMMAP
+.endif
+
CPPFLAGS.loadmod.c= ${X11FLAGS.EXTENSION} -DDEFAULT_MODULE_PATH=\"${X11USRLIBDIR}/modules\"
CPPFLAGS.xf86sym.c= ${X11FLAGS.EXTENSION}
CPPFLAGS.dixsym.c= ${X11FLAGS.EXTENSION}
>Release-Note:
>Audit-Trail:
>Unformatted: