X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,SPF_NEUTRAL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4F956300.8000009@cs.utoronto.ca> Date: Mon, 23 Apr 2012 10:11:12 -0400 From: Ryan Johnson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Building for nocygwin References: <6BFA9AF2C7556E42AFF3F187ECAB07B802F9CFD0 AT bespdc01 DOT mediaxim DOT local> <6BFA9AF2C7556E42AFF3F187ECAB07B802F9CFEF AT bespdc01 DOT mediaxim DOT local> <6BFA9AF2C7556E42AFF3F187ECAB07B802F9D004 AT bespdc01 DOT mediaxim DOT local> In-Reply-To: <6BFA9AF2C7556E42AFF3F187ECAB07B802F9D004@bespdc01.mediaxim.local> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 23/04/2012 9:56 AM, Michel Bardiaux wrote: > [snip] > >> That is the "general solution". The error message was appropriate and gave a clue. Beyond that >> you'll need to communicate a patch to the maintainers of the package that is still using -mno-cygwin. > Let me rephrase. > > gcc-3 -mno-cygwin -o foo.exe foo.c > > under cygwin, works to create a windows executable that does not reference the cygwin dlls. (provided of course that foo.c does not call any APIs that can only be provided by cygwin, like fork). That *was* a general solution. > > What is the equivalent using gcc-4 under cygwin? The -mno-cygwin option was a dirty, half-broken hack that was replaced by a proper cross-compiler starting with gcc-4. If you want to compile an app under cygwin that doesn't depend on cygwin at runtime, you should install and use the mingw-targeted cross compiler that exists precisely for that purpose (it's available in setup.exe). If you don't know what a cross-compiler is, or how to specify one to ./configure, then Google it (it's not a cygwin-specific thing). If your project of choice doesn't support cross compiling, file a bug with the maintainers or, in the unlikely case that the project doesn't use POSIX features, set CC to the mingw compiler. Regards, Ryan -- 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