From: riley@theory.TC.Cornell.EDU (Daniel S. Riley)
Subject: Re: Problems - R5 build on DS 5000/25 using gcc-2.2.2
Organization: Cornell Theory Center
Date: Thu, 20 Aug 1992 22:04:38 GMT

In article <1992Aug19.152652.11529@ennews.eas.asu.edu>,
scowen@wfpc3.NoSubdomain.NoDomain (Paul A. Scowen) writes:
>now while this may be a gcc error, it also has implications for the R5 
>build as a whole since gcc is the recommended compiler, from the README's
>I've read.

The comments about gcc being much better are primarily meant for the
VAXen, as are the gcc flags in ultrix.cf.  On the DECstations, gcc
doesn't produce code that is obviously that much better than cc.

For the curious, here is my ultrix.cf and site.def for X11R5pl16 with
gcc 2.2.2 on RISC Ultrix 4.2a.  The

#define ServerCCOptions -funroll-loops -DLARGE_INSTRUCTION_CACHE

was an attempt to build a faster server for the DS5000/120s.  I haven't
had time to benchmark the result, so I'm not sure if it was successful
or not, but it does seem faster (and everything does seem to work).  The
wary may want to remove those, since I have found no indications that
-DLARGE_INSTRUCTION_CACHE is supported--I just found it while browsing
the server code.


XCOMM platform:  $XConsortium: ultrix.cf,v 1.45 91/07/30 12:12:11 rws Exp $

#define OSName            Ultrix-32 4.2
XCOMM operating system:  OSName
#define OSMajorVersion    4
#define OSMinorVersion    2

#define HasPutenv YES
#define HasSaberC YES
#define HasShm YES
#define LintLibFlag -o
#define LintOpts -ax

#ifdef VaxArchitecture
#define XqdssServer YES
#define XqvssServer YES
#define UnalignedReferencesAllowed YES	       /* if arbitrary deref is okay */
#if HasGcc
#define BuildPexExt XqdssServer
#else
#define BuildPex NO /* compiler runs out of table space */
#endif
#endif

#ifdef MipsArchitecture
#if OSMajorVersion > 4 || (OSMajorVersion == 4 && OSMinorVersion >= 2)
#define XdecServer YES
/* Even under ultrix 4.2, the compiler miscompiles some alloca calls */
#define AllocateLocalDefines /* -DINCLUDE_ALLOCA_H */
#else
#define XmfbpmaxServer NO
#define XcfbpmaxServer YES
#define AllocateLocalDefines /**/
#endif
#define NeedFunctionPrototypes YES
#ifndef HasGcc
#define PexCCOptions -Wf,-XNp15000,-XNd15000 -Olimit 2000
#endif
#endif

#if HasGcc
#define CcCmd gcc -fpcc-struct-return
#define ServerCCOptions -funroll-loops -DLARGE_INSTRUCTION_CACHE
#define AllocateLocalDefines /* */
#endif

#define ServerOSDefines AllocateLocalDefines




XCOMM site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $

/*****************************************************************************
 *                                                                           *
 *			   SITE-SPECIFIC DEFINITIONS                         *
 *                                                                           *
 * This file contains two halves, one included before the vendor-specific    *
 * configuration file (.cf file), and one included after the .cf file.       *
 * The before-half should be protected by #ifdef BeforeVendorCF, and the     *
 * after-half should be protected by #ifdef AfterVendorCF.                   *
 *                                                                           *
 * The before-half should only set things that the .cf file depends on.      *
 * For the .cf files shipped in this release, the main variable in this      *
 * category is HasGcc.                                                       *
 *                                                                           *
 * The after-half should contain all other definitions.  For example,        *
 * place your ProjectRoot definition here.  Beware that several of the       *
 * .cf files supplied by vendors have a ProjectRoot already defined, so      *
 * you may need to #undef it first.                                          *
 *                                                                           *
 * OS Major and Minor version numbers should be changed directly in the .cf  *
 * file, not overridden in site.def.                                         *
 *                                                                           *
 *****************************************************************************/

#ifdef BeforeVendorCF

#define HasGcc YES
#define HasGcc2 YES

#endif /* BeforeVendorCF */

#ifdef AfterVendorCF

#ifdef ProjectRoot
#undef ProjectRoot
#endif
#define ProjectRoot		/usr/local
#define XmanLocalSearchPath	/usr/local/man
#define BinDir			/usr/local/X11

#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/,/usr/lib/X11/fonts/decwin/75dpi/,/usr/lib/X11/fonts/decwin/100dpi/

#define ConnectionFlags	-DTCPCONN -DUNIXCONN -DDNETCONN
#define ExtraLibraries	-ldnet
#ifdef HasGcc
#define OptimizedCDebugFlags -O2
#else
#define DefaultCCOptions -Olimit 2000
#endif

#define ManSuffix	1
#define MotifBC			YES

#define StripInstalledPrograms	YES
#define InstKmemFlags		-g kmem -m 2755

#define HasXdmAuth		YES

#define HasFortran		YES

#endif /* AfterVendorCF */


-- 
-Dan Riley                          Internet: dsr@lns598.tn.cornell.edu
-Wilson Lab, Cornell University     HEPNET/SPAN: lns598::dsr (44630::dsr)