gcc: turning off large-address awareness

Ken Brown kbrown@cornell.edu
Sat Apr 14 17:21:00 GMT 2012

On 4/14/2012 12:37 PM, Earnie Boyd wrote:
> On Sat, Apr 14, 2012 at 7:52 AM, Ken Brown wrote:
>> For testing purposes, I'd like to build without large-address awareness.
>>   What's the right way to do that?  I tried
>>    LDFLAGS=-Wl,--no-large-address-aware
>> and
>>    LDFLAGS=-Wl,--disable-large-address-aware
>> but both resulted in "unrecognized option" errors from ld.
> You specify --large-address-aware if you want it and don't specify if
> you don't want it.

Sorry, I should have explained more clearly what the issue is.  Cygwin's 
gcc specifies --large-address-aware by default:

$ gcc -dumpspecs | grep large
   %{mwindows:--subsystem windows}   %{mconsole:--subsystem console} 
%{!mno-cygwin:%{!mno-use-libstdc-wrappers:   --wrap _Znwj   --wrap _Znaj 
   --wrap _ZdlPv   --wrap _ZdaPv   --wrap _ZnwjRKSt9nothrow_t   --wrap 
_ZnajRKSt9nothrow_t   --wrap _ZdlPvRKSt9nothrow_t   --wrap 
_ZdaPvRKSt9nothrow_t }}   %{shared: %{mdll: %eshared and mdll are not 
compatible}}   %{shared: --shared} %{mdll:--dll}   %{static:-Bstatic} 
%{!static:-Bdynamic}   %{shared|mdll: --enable-auto-image-base -e 
%{!mno-cygwin:--dll-search-prefix=cyg     %{!shared: %{!mdll: 
--large-address-aware --tsaware}}}

I'm trying to override this default.


Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list