Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 2 Mar 2005 10:38:40 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Error linking under Cygwin: fork: can't reserve memory for stack XXX, Win32 error 487 Message-ID: <20050302153840.GA15633@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i On Wed, Mar 02, 2005 at 03:49:33PM +0100, Martin Egholm Nielsen wrote: >Hi there, > >I've ended up here after having rounded the gcc-irc-channel and the >crosscompiler mailing-list. > >The story: > >I have compiled a gcc crosscompiler hosted under Cygwin using Dan >Kegel's Crosstool scripts. > >However, as my application is growing in size (number of .o files) I >suddenly get the following fault message from collect2.exe when trying >to link them all together: > >$ powerpc-405-linux-gnu-gcj --main=foo.Main *.o >C:\cygwin\opt\crosstool\powerpc-405-linux-gnu\gcc-3.4.0-glibc-2.2.5\libexec\gcc\powerpc-405-linux-gnu\3.4.0\collect2.exe >(1740): *** fork: can't reserve memory for stack 0x40000 - 0x240000, Win32 >error 487 > > >There is roughly 600 .o files to link together. > >Andrew Haley from RedHat mentioned that >"There's some magic in Win32 to extend the size of a stack segment" >"I can't remember the command" > >Can anybody on this list help me out here? % gcc -v --help |& grep stack -fstack-limit-register= Trap if the stack goes past -fstack-limit-symbol= Trap if the stack goes past symbol -fstack-check Insert stack checking code into the program -fomit-frame-pointer When possible do not generate stack frames -fdefer-pop Defer popping functions args from stack until later -fstack-checking Enable stack checking (same as `{$S+}') -fno-stack-checking Disable stack checking (same as `{$S-} (default)') -mstack-arg-probe Enable stack probing -mpreferred-stack-boundar Attempt to keep stack aligned to this power of 2 --stack Set size of the initial stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ However, this may actually also be a sign that you need to run rebaseall. See /usr/share/doc/Cygwin/rebase*.README . cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/