Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!CSRI.TORONTO.EDU!moraes From: moraes@CSRI.TORONTO.EDU (Mark Moraes) Newsgroups: comp.windows.x Subject: Re: X11R3 with gcc Message-ID: <89Apr20.202936edt.741@church.csri.toronto.edu> Date: 21 Apr 89 00:29:29 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 39 On Sun3s running SunOS3.5, we were able to compile the X11R3 server successfully with gcc-1.30, and gcc-1.31. It didn't work with gcc-1.32, and the original gcc-1.33 dumped core on several files in the server source. (This was fixed by a patch from RMS which earle@SUN.COM (Greg Earle) posted to gnu.gcc.bug) gcc-1.34 appears to compile the server happily without profiling; with -pg, it makes the Sun loader dump core, when linking a file in libcfb.a - haven't traced it any further yet. gcc-1.34 (and the patched 1.33) also compiles xbrowser properly - 1.30 dumped core on a source file in it. gcc-1.34 also generates correct code for xps (Crispin Goswell's PostScript interpreter) - when compiled with earlier versions, xps would dump core on startup. As a matter of interest, ordinary cc will still not compile it correctly with -O. xps passes structs with unions in them around on the stack - a very good way of testing compiler endurance, it seems. gcc-1.28 was successfully used to compile the X11R2 server on uVaxen. In all cases, we have seen substantial improvement in performance (20% or more) by using gcc (also 10-20% reduced binary size, depending what options you use - I prefer to use only -O, some may want to try -fstrength-reduce and -finline-functions); the PurduePlus or Purdue2.1 fixes take advantage of gcc inline assembler to improve performance further on Suns, at least. As the Purdue2.1 README notes, using gcc to compile Sun malloc, if you have source, also yields a considerable performance improvement. If you can find a faster malloc, you can try using if, provided it has a memalign() function. (the server uses this for allocating the space into which it maps the frame buffer) With gcc-1.34, we've also compiled most of the core applications and libraries, and those parts of contrib that had Imakefiles and manual pages with gcc (after getting around problems with sscanf() and mktemp() which I mentioned in an earlier note).