Subject: dlopen() for macppc XFree86 & enabling the "nv" driver by default.
To: None <tech-x11@netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: tech-x11
Date: 08/22/2002 21:22:11
hi folks.
to get X working on my G4 tower i had to enable the "nv" driver for
the macppc (and more) XFree86. this works OK for me, except that
for the following files, i had to add a patch (copied from elsewhere
in the xc tree) like:
+ #ifndef MAXSHORT
+ #define MAXSHORT 32767
+ #endif
programs/Xserver/cfb/cfbfillarc.c
programs/Xserver/cfb/cfbzerarc.c
programs/Xserver/fb/fbarc.c
programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c
programs/Xserver/hw/xfree86/xaa/xaaFillArc.c
programs/Xserver/mfb/mfbfillarc.c
programs/Xserver/mfb/mfbzerarc.c
i also have tested this configuration with the dlopen() support for
all "drivers" in XFree86. this is a pretty huge difference:
-rws--x--x 1 root wheel 7738708 Aug 21 00:49 /usr/X11R6.working/bin/XFree86*
-rws--x--x 1 root wheel 2042426 Aug 22 14:36 /usr/X11R6/bin/XFree86*
with this as a new directory (in kilobytes):
9434 /usr/X11R6/lib/modules
i'd like to commit both of the changes inthe patch below, but i am
much less sure about the MAXSHORT problem. the only reason i've
added the 3 line patch to the relevant files is that i found a
handful of other files that do this - when in rome, as they say.
comments?
.mrg.
Index: config/cf/NetBSD.cf
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/config/cf/NetBSD.cf,v
retrieving revision 1.29
diff -p -r1.29 NetBSD.cf
*** config/cf/NetBSD.cf 2002/08/03 21:59:09 1.29
--- config/cf/NetBSD.cf 2002/08/22 10:56:41
*************** XCOMM operating system: OSName (OSMajor
*** 174,186 ****
*
* Disabled for NetBSD/vax until I figure out the scheme. --CS
*/
! #if (OSMajorVersion > 0) && defined(i386Architecture)
! # ifndef DoLoadableServer
! # define DoLoadableServer YES
! # endif
! #else
! # ifndef DoLoadableServer
! # define DoLoadableServer NO
# endif
#endif
--- 174,184 ----
*
* Disabled for NetBSD/vax until I figure out the scheme. --CS
*/
! #ifndef DoLoadableServer
! # if (OSMajorVersion > 0) && (defined(i386Architecture) || defined(PpcArchitecture))
! # define DoLoadableServer YES
! # else
! # define DoLoadableServer NO
# endif
#endif
*************** sed 's/\.[0-9]*$$//'`
*** 627,636 ****
# define OptimizedCDebugFlags -O2
# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
-
- # ifndef DoLoadableServer
- # define DoLoadableServer YES
- # endif
# define UseElfFormat YES
--- 625,630 ----
Index: config/cf/xfree86.cf
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/config/cf/xfree86.cf,v
retrieving revision 1.5
diff -p -r1.5 xfree86.cf
*** config/cf/xfree86.cf 2002/08/03 21:59:09 1.5
--- config/cf/xfree86.cf 2002/08/22 10:56:42
*************** XCOMM $Xorg: xfree86.cf,v 1.4 2000/08/17
*** 653,659 ****
/* Pure PCI drivers should go first */
# ifndef XF86CardDrivers
! # define XF86CardDrivers ati cirrus mga glint s3 s3virge sis savage\
trident chips tdfx fbdev \
DevelDrivers vga \
XF86OSCardDrivers XF86ExtraCardDrivers
--- 653,659 ----
/* Pure PCI drivers should go first */
# ifndef XF86CardDrivers
! # define XF86CardDrivers ati nv cirrus mga glint s3 s3virge sis savage\
trident chips tdfx fbdev \
DevelDrivers vga \
XF86OSCardDrivers XF86ExtraCardDrivers