delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/03/03:42:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
From: Martin Egholm Nielsen <martin AT egholm-nielsen DOT dk>
Subject: Re: Error linking under Cygwin: fork: can't reserve memory for stack XXX, Win32 error 487
Date: Thu, 03 Mar 2005 09:41:37 +0100
Lines: 63
Message-ID: <d06ian$1ej$1@sea.gmane.org>
References: <d04jgq$fr3$1 AT sea DOT gmane DOT org> <20050302153840 DOT GA15633 AT trixie DOT casa DOT cgf DOT cx>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: 212.130.19.66
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910
In-Reply-To: <20050302153840.GA15633@trixie.casa.cgf.cx>
X-Gmane-MailScanner: Found to be clean
X-Gmane-MailScanner: Found to be clean
X-Gmane-MailScanner-SpamScore: s
X-MailScanner-From: goc-cygwin AT m DOT gmane DOT org
X-MailScanner-To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Hi,

>>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
>><REPEATED>
>>
>>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=<register>  Trap if the stack goes past <register>
>     -fstack-limit-symbol=<name>  Trap if the stack goes past symbol <name>
>     -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 <size>                     Set size of the initial stack
>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Hum, these options are not available in my crosscompiler:

$ powerpc-405-linux-gnu-gcc -v --help 2>&1 | grep stack
   -fdefer-pop                 Defer popping functions args from stack until
   -fomit-frame-pointer        When possible do not generate stack frames
   -fstack-check               Insert stack checking code into the program
   -fstack-limit               This switch lacks documentation
   -fstack-limit-register=<register> Trap if the stack goes past <register>
   -fstack-limit-symbol=<name> Trap if the stack goes past symbol <name>
   --execstack             require executable stack for this object
   --noexecstack           don't require executable stack for this object
   -z execstack          Mark executable as requiring executable stack
   -z noexecstack        Mark executable as not requiring executable stack
   -z execstack          Mark executable as requiring executable stack
   -z noexecstack        Mark executable as not requiring executable stack
   -z execstack          Mark executable as requiring executable stack
   -z noexecstack        Mark executable as not requiring executable stack

> However, this may actually also be a sign that you need to run rebaseall.
I've tried running rebaseall without any errors, but also without any 
changes in the above behavior...

// Martin


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019