From owner-freebsd-questions Fri Feb 9 18: 5:25 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id DF8B437B401 for ; Fri, 9 Feb 2001 18:05:07 -0800 (PST) Received: (qmail 20945 invoked by uid 100); 10 Feb 2001 02:05:06 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14980.41426.806863.609748@guru.mired.org> Date: Fri, 9 Feb 2001 20:05:06 -0600 (CST) To: Kris Kennaway , christor@UG.CS.SUNYSB.EDU Cc: questions@freebsd.org Subject: Re: gcc running out of swap space during build... In-Reply-To: <65898979@toto.iv> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Kris Kennaway types: > > It seems to me that if I give gcc an option that does not exist, it > > should complain about it, shouldn't it? > gcc treats anything above -O3 as equivalent to -O3. As noted, -O3 has > optimizer bugs, which was causing it to fail for you. There's a fair chance that even *without* the optimizer bugs, it would fail - unless one of the bugs is "deal with out of memory errors cleanly". Lots of optimization means means lots of global code analysis, which means lots of memory usage. Possibly even exponential in the size of the function. I'll bet builtin.c has some huge honking function in it, so the compiler runs out of memory. My favorite example of this is trying to compile Perl on a MIPS compiler (which tells you how old the chestnut is). Doing it on a machine with 24Meg of ram took 8 hours to compile the evaluator. Going to 48 meg of ram in the machine brought it down to 15 minutes. Not turning on optimization worked like a charm as well. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message