gcc and g++ compilers

Jack F. Vogel jackv at turnkey.gryphon.COM
Wed Aug 23 08:17:36 AEST 1989


In article <2875 at dell.dell.com> james at raid.dell.com (James Van Artsdalen) writes:
>In <6348 at turnkey.gryphon.COM>, jackv at turnkey.gryphon.COM (Jack F. Vogel) wrote:
>
>> First off I am running ISC 2.0.1 on a 20Mhz system with 3 Meg of memory.
>> I have successfully built gcc, but it has some problems. Mainly it
>> is SLOW!!!, it seems that when the pass gcc-cc1 runs it hangs the whole
>> system for quite a while, I do not know if it grabs so much memory that
>> everything else is swapped out or what.
>
>What version of gcc?  How was it built?  I hope you didn't try to use
>the portable alloca() floating around - it can consume enormous
>amounts of memory.
 
James, you are quite right, I was using the alloca source file in the
archive. Out of curiosity, I changed the makefile to pull it out of
libPW and to use libmalloc and performance got much better. Mind you, it
still can be slow but at least it seems more agreeable.

>With only 3meg of memory, it is very likely that things are getting
>swapped.  In addition, function inlining can make gcc grow
>tremendously. 
 
Yes, I have checked using ps while the thing was running and BOY can it
chew up the memory!! g++ is even worse, I have seen it grabbing up close
to 480 pages on compiling some files, it is doing so even on small files.
I am about to alleviate this situation, since I am picking up a memory 
upgrade to 8 Meg tomorrow (I can hardly wait!!).

>> Secondly, I have tried to build the g++ compiler and had even less success.
>
>I don't think g++ is well ported to the 386 yet.  I know of a couple
>of people who have done it, and neither recommend it unless you're
>really serious about doing some hacking on it.  In particular the
>g++ libraries are still BSD dependent I understand.

I have gotton considerably further along with g++ since when I posted my first
plea for help. I want to thank all those who took the time to send me mail. I
still have not gotton it to completely work however, my biggest source of 
headaches has been that the source archive I was using was not untouched. I
still cannot completely build libg++.a since the g++ compiler actually sleeps
awaiting more memory indefinitely when compiling certain files!! As I just
said with the increase to 8Meg I expect this problem to disappear. I have made
enough of the library to use it on linking simple programs, and I can now
completely compile, assemble and link an executable load module. What is real
weird now, is that although the programs execute, the streams objects (cin,
cout,and cerr) appear not to work, i.e., a program of the form:

#include <stream.h>

main()
{
	cout << "This is a test of the g++ compiler.\n";
}

produces no output at all!?! Yet, a standard C printf sort of syntax linked
with the new crt1+.o and crtn+.o works just fine. Soooo, I am really stumped
at this point, any suggestions would be appreciated. I really want to get
this silly thing working.

Thanks in advance for any input.

-- 
Jack F. Vogel			jackv at seas.ucla.edu
AIX Technical Support	              - or -
Locus Computing Corp.		jackv at ifs.umich.edu



More information about the Comp.unix.questions mailing list