kay@cme.nbs.gov (Jon Kay ) (08/18/89)
Perhaps the reason so many people have trouble compiling X with gcc is that people are using the wrong set of flags. I have compiled the X server twice now, with two different sets of flags. The first set, which which I derived from a document that came with gcc1.35 (X11.README), did not include the -traditional flag. That server dumped core as soon as it started getting requests. Then I recompiled with gcc -O -traditional -fpcc-struct-return -fstrength-reduce and it worked. From other people's flags that I have seen, and from what I know of gcc, I think the critical one is the -traditional. The problem with compiling cfbbitblt.c with gcc1.35 has nothing to do with bugs in gcc. When gcc gets signal 11, that means that it has exceeded the allowed stack space. limit stack 8m will bump up the stack size to 8 megabytes, sufficient to solve the problem. Of course, there *is* a gcc bug which seems to cause it to expand certain expressions infinitely, but this ain't it - cfbbitblt.c looks innocent enough at 22.5K, but it actually contains *and uses* LOTS of BIG macros. If you examine the preprocessor output in /tmp, you'll find a 150K file. So no wonder it takes gcc lots of space.... Jon Kay