[comp.windows.x] building X11R3 with gcc.134

wkd@ascway.UUCP (04/05/89)

I'm running X11R3 on a Sun4 (SunOs4.0.1) with both mono and color
displays. I've been running the R3 stuff since it cam eout with no
problems, but recently decided to rebuild the distribution using
gcc-1.34 since a lot of SPARC problems were fixed in that version. I
went for broke and built the whole thing using 

gcc -traditional -fpcc-struct-return

to see if the "dbm.h" related struct passing problems were fixed. It
appears that the "-fpcc-struct-return" switch didn't fix the problems,
so I recompiled the necessary files using SUN's /bin/cc and everything
is OK. Has anyone used gcc-1.34 with -fpcc-struct-return succesfully?

Bill Duttweiler
Schlumberger Well Services
Austin Systems Center

eap@bu-cs.BU.EDU (Eric Pearce) (04/06/89)

In article <8904051512.AA00331@sake.SWS-ASC.SLB.COM> wkd@ascway.UUCP says:
>I'm running X11R3 on a Sun4 (SunOs4.0.1) with both mono and color
>displays. I've been running the R3 stuff since it cam eout with no
>problems, but recently decided to rebuild the distribution using
>gcc-1.34 since a lot of SPARC problems were fixed in that version. I
>went for broke and built the whole thing using 
>
>gcc -traditional -fpcc-struct-return
>
>to see if the "dbm.h" related struct passing problems were fixed. It
>appears that the "-fpcc-struct-return" switch didn't fix the problems,
>so I recompiled the necessary files using SUN's /bin/cc and everything
>is OK. Has anyone used gcc-1.34 with -fpcc-struct-return succesfully?
>
>Bill Duttweiler
>Schlumberger Well Services
>Austin Systems Center

 I managed to build the entire distribution on a Sun4 (SunOS 4.0) and
 a Sun3 (SunOS 4.0) using gcc-1.34.   This is with fix1-9 and the 
 Purdue speedups installed.   The problems I had were as follows:

 rgb/rgb would core dump when it ran on the Sun4, it worked when
 compiled with /bin/cc.  (worked fine with gcc on Sun3)
 poking around with gdb indicates it seg faulted in "calchash" which
 appears be in the dbm library.

 clients/xdm/Login.h was missing a semi-colon inside of a struct
 declaration.

 server/os/4.2bsd/oscolor.c gave "recursive use of macro `fetch'"
 compiled fine with /bin/cc.  

 lib/Xt/fd.h complained about "fd_mask" being redefined.  The
 declaration appeared identical to the one in /usr/include/sys/types.h,
 so I just commented that part out in fd.h.

 twm dumped core when compiled with gcc, use of "-fwritable-strings"
 fixed that.

 I used "gcc -tradtional -finline-functions -fstrength-reduce -O
 -DPURDUE" to compile.  I also applied the Purdue patch for dbm.h.

 I did not investigate any of these fully, I was mainly interested in
 seeing if it would work (it does!).  I've tested the Sun3 version on
 color and b&w 3/60's.  I've only run the client stuff for the Sun4 version.

 I could produce a set of patches if these are legitimate problems.

 -e 


-- 
-------------------------------------------------------------------------------
 Eric Pearce                                   ARPANET eap@bu-it.bu.edu
 Boston University Information Technology      CSNET   eap%bu-it@bu-cs
 111 Cummington Street                         JNET    jnet%"ep@buenga" 
 Boston MA 02215                               UUCP    !harvard!bu-cs!bu-it!eap 
 617-353-2780 voice  617-353-6260 fax          BITNET  ep@buenga