[gnu.gcc.bug] X.V11R3 vs. gcc - final round action?

earle@SUN.COM (Greg Earle) (12/17/88)

OK, so has anyone compiled the canonical list of patches/gcc options/makefile
mucakarounds/gotchas/whathaveyous to compile at least the core X V11 R3
distribution with GNU C?

I'd like to be able to fire up make World and walk away from it, and not have
it bomb on 7 different files, and then have those 7 different files be
different on a different (Sun) architecture, because of option flag incompat-
ibilities and the like.

I've seen various patches (e.g. from Casey Leedom), a few of which have
overlapped fixes I've found and made myself, but still many files cause gcc
to have a heart attack.  Other people have hinted at having used gcc to build
X, so there must be a resource pool there somewhere.

Note that I am trying to be as strict as possible; i.e. using gcc switches
like `-O -fstrength-reduce -finline-functions -fcombine-regs' and starting
off using `-ansi -pedantic', at least until I got beaten into submission.  :^)

	- Greg Earle
	  Sun Los Angeles Consulting
	  earle@Sun.COM
	  poseur!earle@elroy.JPL.NASA.GOV
	  ...!sun!tsunami!valley!poseur!earle	(Leaf node hell)

rapatel@athos.rutgers.edu ( Rakesh Patel) (12/18/88)

I have compiled the core distribution using gcc 1.31 on Sun 2s and 3s,
and compiled, but not fully tested it on the Sun 4. I have used the
Purdue and Purdue+ speedups as well in the server. The flags that I
used are:

-O,-fcombine-regs,-fomit-frame-pointer,-finline-functions.

There are two problems that you will run into. The first was pointed
out by Gene Spafford in the speedup documentation - you need to
compile server/os/4.2bsd/oscolor.c with Sun's cc due to the use of the
dbm library calls. The other thing is that xdm will not compile
correctly without the patches top make X11R3 compile on the Pyramid.
Turns out the pyramid patch fixes an error in an include file
(Login.h?), which then satisfies gcc. The latter can be fixed before
doing a "make World", however, you will need to manually compile
oscolor.o after all the Makefiles and dependancies are updated during
the make World. I don't recall any othe problems. You also want to make
sure to have the official patches installed.



							Rakesh Patel.

bob@dinosaur.cis.ohio-state.edu (Bob Sutterfield) (12/18/88)

I also found that the 1.30 GCC optimizer couldn't handle
lib/Xt/TMParse.c any better than Sun's could (cc1 died, signal 11).  I
embellished the special case in lib/Xt/Imakefile just a bit, to ensure
that TMparse.o, debugger/TMparse.o, and profiled/TMparse.o were all
compiled without -O.

If you've got 1.31, all should be well.

I use "-O -traditional -fcombine-regs -fstrength-reduce -fwritable-strings".