This is the mail archive of the
mailing list for the Cygwin project.
Re: cross-compiling to Linux?
- From: "Larry Hall (Cygwin)" <reply-to-list-only-lh at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 01 Sep 2014 21:21:21 -0400
- Subject: Re: cross-compiling to Linux?
- Authentication-results: sourceware.org; auth=none
- References: <016b01cfc50b$3c3d5bc0$b4b81340$ at gmail dot com>
- Reply-to: cygwin at cygwin dot com
On 08/31/2014 07:03 AM, Juhász Ádám wrote:
When I was developing one of my program, I've tried to compile it under
Cygwin, and for some reason Cygwin's g++ always compiled it without
extension (and maybe an ELF executable?), so I had to create an explicit
rule to compile it with the EXE extension.
However just before I also installed MinGW so I can see what libraries does
that includes, I've noticed that Cygwin created an ELF executable (utterly
useless in Windows) however I deleted it without a second thought and just
then I've realized that I should've tried whether it runs on a Linux
machine. (My assumption was that it possibly was a PE executable with an ELF
header.) Now I've installed MinGW, and right after that, Cygwin also
generates proper PE executables for Windows, and can't seem to force it to
compile it as ELF executable despite all it took was to omit the EXE
Was this the proper behavior for Cygwin that MinGW changed?
What could possibly have MinGW did to change this behavior?
Is it *really* possible to cross-compile to Linux with Cygwin-Not that it
isn't possible, but whether is it possible by a basic setup or does Cygwin
provides a special package for that (or neither)?
I can't speak to what you saw initially but interpreting the results you
got as an ELF executable is incorrect. Cygwin's build tools target Windows/
As for cross-compiling with Cygwin, see the gcc FAQ on the subject:
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple