X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,SPF_NEUTRAL,TW_NW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4F89C67B.30905@cornell.edu> Date: Sat, 14 Apr 2012 14:48:27 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: gcc: turning off large-address awareness References: <4F896504 DOT 3030006 AT cornell DOT edu> <4F89B215 DOT 9050903 AT cornell DOT edu> <20120414173342 DOT GD15801 AT ednor DOT casa DOT cgf DOT cx> In-Reply-To: <20120414173342.GD15801@ednor.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-CORNELL-SPAM-CHECKED: Pawpaw X-Original-Sender: kbrown AT cornell DOT edu - Sat Apr 14 14:48:34 2012 X-PMX-CORNELL-REASON: CU_White_List_Override X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 On 4/14/2012 1:33 PM, Christopher Faylor wrote: > On Sat, Apr 14, 2012 at 01:21:25PM -0400, Ken Brown wrote: >> 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:_DllMainCRTStartup AT 12} >> %{!mno-cygwin:__cygwin_dll_entry AT 12}} >> %{!mno-cygwin:--dll-search-prefix=cyg %{!shared: %{!mdll: >> --large-address-aware --tsaware}}} >> >> I'm trying to override this default. > > You're right that there isn't a way to disable --large-address-aware > but, since it's part of the specs, I'm not sure what would take > precedence if there was a --disable* option. > > You could try using the above to create your own spec file and use > that on the command line for gcc, cumbersome as it is. That works, thanks. I didn't know about spec files. Ken -- 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