delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/12/16/11:55:58

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_40,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Message-ID: <4D0A448F.8090705@cwilson.fastmail.fm>
Date: Thu, 16 Dec 2010 11:55:43 -0500
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
Reply-To: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: mingw-targeted cross-compiler question
References: <30467239 DOT post AT talk DOT nabble DOT com> <AANLkTikCqUhVfD71CGGn6WsTASAgYVmjX2SBLoy+XgWb AT mail DOT gmail DOT com> <AANLkTinCuy-W_qdv5oR8GY664qCfPPeJ7M6jR3oSDSSK AT mail DOT gmail DOT com>
In-Reply-To: <AANLkTinCuy-W_qdv5oR8GY664qCfPPeJ7M6jR3oSDSSK@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

On 12/16/2010 7:55 AM, NightStrike wrote:
> 2010/12/16 Frédéric Bron <...>:
>>> I checked the Make file, it used this flag:
>>> gcc -mno-cygwin -g -Wl,--add-stdcall-alias -Wl,--export-all-symbols ...
>>
>> replace gcc by gcc-3
>> gcc 4 is now the default on cygwin but the cross compiler is not
>> supported for that version.
>> Frédéric
> 
> What do you mean by not supported?  JonY maintains the cross compilers....
> 

I think Frédéric just mis-stated: he was referring to 'gcc -mno-cygwin'
as "the cross compiler" which it really isn't, and never was.  It just
acted /almost/ like one.

The mingw64-{i686,x86_64} cross compilers are certainly supported, but
they do require configuring with --host={i686,x86_64}-w64-mingw32 (or,
in some cases, explicitly setting $CC) which is somewhat different that
the old procedure using 'gcc{-3} -mno-cygwin'; this difference can be
confusing to some users.

However, I have to point out the obvious: i686-w64-mingw32-gcc does
*not* produce the same code that a hypothetical cygwin 'gcc-4
-mno-cygwin' would, because cygwin's gcc would use the mingwrt and
w32api runtime headers and libs, not the mingw64's corresponding runtime
headers and libs.  The ITP'ed mingw-gcc cross compiler *would* be the
equivalent of 'gcc-4 -mno-cygwin' once it is accepted.

However, users like the OP would be free to use any of the three
mingw-ish cross compilers, with perfectly valid results.  In many ways,
the mingw64- offerings have more thorough support for the complete
w32api...but the (still unofficial) mingw cross compiler is compatible
with the mingw.org offerings...

--
Chuck

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

- Raw text -


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