Subject: Xserver on pmax?
To: None <port-pmax@netbsd.org>
From: Christopher SEKIYA <wileyc@rezrov.net>
List: port-pmax
Date: 01/25/2004 12:13:41
All,

I'm in the final stages of polishing the Xserver for sgimips (using the
hw/xfree86 code) and have noticed that an Xserver for pmax exists (using the
hw/netbsd code).

Unfortunately for me, the way the config/cf definitions are keyed from gcc's
defines, if I throw the switch for sgimips I might break the pmax build
(although the bit in Imake.cf leads me to believe that the pmax build might
well have been broken anyway).

Below is the diff I've been using for config/cf.  Is my fear justified?
If so, is there a mechanism by which we can do the right thing for both
platforms?

Thanks,

-- Chris
	GPG key FEB9DE7F (91AF 4534 4529 4BCC 31A5  938E 023E EEFB FEB9 DE7F)


Index: Imake.cf
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/config/cf/Imake.cf,v
retrieving revision 1.9
diff -u -r1.9 Imake.cf
--- Imake.cf	15 Mar 2003 13:27:21 -0000	1.9
+++ Imake.cf	25 Jan 2004 03:11:26 -0000
@@ -186,10 +186,10 @@
 #    define Sparc64Architecture
 #  endif
 # endif
-# ifdef mips
+# ifdef __mips__
 #   define MipsArchitecture
 #   define ArcArchitecture
-#   undef mips
+#   undef __mips__
 # endif
 # ifdef __alpha__
 #   define AlphaArchitecture
Index: NetBSD.cf
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/config/cf/NetBSD.cf,v
retrieving revision 1.58
diff -u -r1.58 NetBSD.cf
--- NetBSD.cf	19 Dec 2003 13:03:47 -0000	1.58
+++ NetBSD.cf	25 Jan 2004 03:11:26 -0000
@@ -307,6 +307,9 @@
 #  ifndef XFree86ConsoleDefines
 #    define XFree86ConsoleDefines -DWSCONS_SUPPORT
 #  endif
+#elif defined(MipsArchitecture)
+#    define XFree86ConsoleDefines -DWSCONS_SUPPORT
+#  define ServerExtraDefines    GccGasOption XFree86ServerDefines
 #else
 #  define ServerExtraDefines GccGasOption
 #endif
@@ -610,7 +613,7 @@
 /* Always build the XInput library, regardless of server support on this plattform */
 #define BuildXInputLib          YES
 
-#if defined(i386Architecture) || defined(Arm32Architecture) || defined(AlphaArchitecture) || defined(PpcArchitecture) || defined(CatsArchitecture) || defined(x86_64Architecture)
+#if defined(i386Architecture) || defined(Arm32Architecture) || defined(AlphaArchitecture) || defined(PpcArchitecture) || defined(CatsArchitecture) || defined(x86_64Architecture) || defined(MipsArchitecture)
 # include <xfree86.cf>
 #endif
 
@@ -686,12 +689,10 @@
 /*
  * Definition for compiling on MIPS machines
  */
+
 #ifdef MipsArchitecture
-#define PositionIndependentCFlags
-#define SharedLibraryLoadFlags -x -shared --whole-archive -soname `echo $@ |
-sed 's/\.[0-9]*$$//'`
-#define SharedXtReqs $(XLIBONLY) $(SMLIB) $(ICELIB)
-#define SharedXmuReqs $(LDPRELIB) $(XTOOLONLYLIB) $(XONLYLIB) $(EXTENSIONLIB)
+#undef XF86CardDrivers
+#define XF86CardDrivers		newport
 #endif
 
 /*