This patchkit contains a set of patches to make X11R5 work on Solaris 2.1. Version of this release: 1/update 2 o Contents - Overview of the patchkit - Applying the various patches - Compiling with gcc 2.x on Solaris 2.x - Compiling Sun C - Compiling on earlier versions of SunOS o Overview of the patchkit This patchkit hopes to unify all sets of Solaris 2.x patches floating about (thanks to Danny Backx, Dana Chee and John DiMarco). It supports both the standard X server (pure MIT X11 at pl 19 or later) and the same server with the Xsun multiscreen patch (xmsp) (by Kaleb Keithley) applied. The newest version of the Xsun multiscreen patch included Solaris support, the apply-patch script will detect this fact and does the right thing. The patch was develop using MIT pl 21. Since patch 19 was the last patch that touched files we changed, Patch level 19 and 20 should be OK too. Patchlevel 22 and 23 won't give you any trouble either. Note: patchlevel 24 and later are untested. It supports both SunPRO C and GNU cc and also supports compiling everything (including shared libraries) with gcc 2.x on SunOS 4.1.x. Shared libraries compiled with gcc are constructed in such a way that they can be used with Sun C compiled binaries and when compiling with Sun C. We also got rid of the UCB compatibility library and headers and the need to specify an LD_RUN_PATH when compiling. This makes it easier to combine OpenWindows and X11 on the same machines. If you install OpenWindows in such a way that /usr/openwin is $OPENWINHOME (either by installing it in /usr of by making a symlink /usr/openwin -> REAL_OPENWINHOME) and install X11 with this patch, neither will require the use of LD_LIBRARY_PATH and both will find their own libs. Bob Scheifler provided us with a Solaris 2.1 version of the sunGX.o binary. Thanks Bob! The patches have been tested on a variety of hardware with both compilers. Please send bug fixes and suggestions to casper@fwi.uva.nl. o Applying the various patches The patchkit consist of the following files README - this file apply-patch - script to apply or unapply the base patches (base patch includes all files marked with a '*') patch.common* - patch common between xmsp code pure X code. patch.pure* - patch for the pure X11 server patch.xmsp* - patch for the old xmsp X11 server sunGX.o.elf* - sunGX.o compiled for SPARC/Solaris 2 sun.cf* - mit/config/sun.cf file sample.site.def - sample site.def file. is not installed by default. patch.olit - patch for lib/Xt patch.xview3pl2 - patch for xview It is recommended to first install the latest version of the X11R5 multi-screen patch. It contains better keyboard and multiple screen support. The patch can be obtained from export.lcs.mit.edu in contrib/R5.Xsun.multi-screen.tar.Z. This patch should work without that patch installed. To apply this patch you'll need Larry Wall's patch program. It is distributed in the X source tree and with Cygnus gcc (binary). To install the patch run the following command: ./apply-patch where is the source directory that contains the X11R5 sources (either the directory containing the mit directory or the mit directory itself). The script will do the following things: - check for supported MIT patchlevel - check whether you have xmsp installed or not. - check whether this patch has been installed already - apply the appropriate patchfiles - install sunGX.o.elf - save the old sun.cf file as sun.cf.bsol2 (before Solaris 2) - install sun.cf - install mit/SOLPATCH as indication that the patch has been installed THERE SHOULD BE NO ERRORS OR REJECTS apply-patch has three further options: -v - show what apply-patch does -n - show what apply-patch would do, but don't do it. -u - remove the patch (will only work if the installed SOLPATCH file matches the one supplied with the patch) You can undo these changes by running: ./apply-patch -u After this you can apply the patch.olit file, if you want: patch -p -s < patch.olit in the directory that contains the mit directory. And the xview3 patch (made from Xview patchlevel 2) patch -p -s < patch.xview3pl2 in the Xview directory containing the file ``LEGAL_NOTICE'' o Compiling with gcc 2.x on Solaris 2.1. On Solaris 2.1, you will need AT LEAST GCC 2.3.3. (NOT 2.3.2 or earlier). (Available in source and binary form from prep.ai.mit.edu:/pub/gnu) Earlier versions will not be able to correctly compile position indenpendent code because gcc will use the wrong symbol for the Global Offset Table. You must run fixincludes !!!!!!!!!! If you have ftp'ed the binary distribution of gcc, the easiest way to run fixincludes (I.e., without having to build gcc 2.3.3 from scratch) is the following, assuming you have installed the lot in /opt/gnu: - Get the gcc 2.3.3 sources # cd # ./configure -prefix=/opt/gnu sparc-sun-solaris2 # make install-fixincludes GCC_FOR_TARGET=gcc GCC_PARTS= GCC_PASSES= The arguments to make prevent the build of gcc. Edit site.def and #define HasGcc YES It is recommended that you #define ProjectRoot. See sample.site.def for more comments. MAKE SURE THAT /usr/ucb IS LAST IN YOUR PATH In the mit directory do the following: make -f Makefile.ini World CC=gcc BOOTSTRAPCFLAGS=-DSVR4 you can redirect the output to a log file (not make.log!!) o Compiling with Sun C Edit site.def and #define HasGcc NO (or not at all). It is recommended that you #define ProjectRoot. See sample.site.def for more comments. MAKE SURE THAT /usr/ucb IS LAST IN YOUR PATH In the mit directory do the following: make -f Makefile.ini World CC=cc BOOTSTRAPCFLAGS=-DSVR4 you can redirect the output to a log file (not make.log!!) o Compiling on earlier versions of SunOS Edit site.def, if you have GCC 2.x, #define HasGcc YES and #define GccVersion 2 Edit sun.cf and change the OS{Major,Minor,Teeny} version defines. In the mit directory do the following: make -f Makefile.ini World CC= you can redirect the output to a log file (not make.log!!) Casper Dik (casper@fwi.uva.nl) John DiMarco (jdd@cdf.toronto.edu)