[comp.windows.x] GCC 1.34 and X11R3 on Sun 3/60

parker@waters.mpr.ca (Ross Parker) (06/10/89)

Hi...

I've recently build X11R3 using gcc version 1.34 and gas version 1.31.
Everything seems to build ok, but whenever I bring up an xterm window,
I get a black background and black foreground. Uwm menus are ok, the
problem seems restricted to xterm. If I recompile the *server* with 'cc',
all appears to work ok.

The machine is a Sun 3/60 monochrome, and the gcc flags I'm using are:

	gcc -O -traditional -finline-functions -fstrength-reduce -m68881

The X code has the purdue speedups and all fixes installed.

I recall seeing references in this newsgroup to problems using gcc on
the sun, but I don't have the articles from that far back anymore.

Has anyone else seen this?

Thanks,

Ross Parker      uunet!ubc-cs!mpre!parker       |
Microtel Pacific Research Ltd.			| You can't erase the dream,
Burnaby, B.C.,					| you can only wake me up...
Canada, eh?					|

nsche@ATR-8.HAC.COM (Norm Scherer) (06/15/89)

I have compiled and run X11R3 using GCC 1.34 on a Sun 3/50 with
no particular problems.  You have probably falled prey to the
problem noted in the README file included with the Purdue.2.0
speedups.

    "Also, using GCC to compile os/4.2bsd/oscolor.c can result in problems
    unless you take corrective measures.  The problem lies with the fact
    that GCC returns structures differently as function values than does
    cc-derived code.  The symptom of this problem is that a GCC-compiled
    server will have totally black (or white) screens with no observable
    text.  To fix the problem, either compile oscolor.c with the regular
    "cc" compiler, or compile the dbm library with gcc and link against
    that.  You can also apply the enclosed dbm-gcc.h.patch file to your
    /usr/include/dbm.h file and compile oscolor.c with gcc as normal."


	Norm Scherer
 	Software Engineering Division
 	Hughes Aircraft Co., Ground Systems Group,
 	Fullerton Ca.
 	(nsche%atr-2s@hac2arpa.hac.com or nsche@atr-2s.hac.com)
 
Opinions are my own, not those of HAC or anyone else I have ever met

parker@eric.mpr.ca (Ross Parker) (06/15/89)

In article <8906142302.AA06258@atr-8.hac.com> nsche@ATR-8.HAC.COM (Norm Scherer) writes:
>I have compiled and run X11R3 using GCC 1.34 on a Sun 3/50 with
>no particular problems.  You have probably falled prey to the
>problem noted in the README file included with the Purdue.2.0
>speedups.
>
>    "Also, using GCC to compile os/4.2bsd/oscolor.c can result in problems
>    ...
>
>	Norm Scherer


Actually, I fell prey to using the wrong gcc options. I included a
"-fpcc-struct-return", and all worked fine. Thanks for the reply,
though, I hadn't noticed the note in the README file (I know, I know...)

For those that are interested... there is a *very noticeable* improvement
in speed after having compiled with gcc. You can even see what you're doing
if you use the right options :-)

Thanks for the help...

-- 
Ross Parker      uunet!ubc-cs!mpre!parker       |
Microtel Pacific Research Ltd.			| You can't erase the dream,
Burnaby, B.C.,					| you can only wake me up...
Canada, eh?					|