From: "Hans-Bernhard Bröker" <HBBroeker@t-online.de>
To: cygwin@cygwin.com
Subject: Re: Providing cygwin1.dll in both 32- and 64-bit versions
Date: Thu, 02 Feb 2017 22:10:00 -0000 [thread overview]
Message-ID: <af15cbdf-cfe5-dba9-e293-844a5de19e6a@t-online.de> (raw)
In-Reply-To: <5893A0CD.5090107@junovagen.se>
Am 02.02.2017 um 22:12 schrieb Thomas Nilefalk:
> Using 'i686-pc-cygwin-gcc' creates an executable but that is un-runnable
> in a Cygwin64 environment because the cygwin1.dll is a 64-bit version
> and not compatible with the produced executable. A cygwin32 DLL needs to
> be put first in the path to make the executable run.
>
> Is this by design?
Pretty much, yes. Windows itself already has a seriously hard time
mixing and matching 32-bit and 64-bit executables and their DLLs. The
tricks MS uses to pull that off range from outright scary to
Marx-Brothers-grade hilarious, depending how you look at them.
As I see it, Cygwin rightfully opted for sanity here by keeping the two
worlds separate.
> At least it seems to me that 'gcc -m32' could be
> taken to mean 'create an executable in the current ABI-environment
> (cygwin64) which uses a 32-bit architecture'.
No, it really can't. -m32 does what the GCC documentation says: it
makes GCC generate 32-bit x86 code. Nothing in there so much as
suggests that such code will actually work in a given ABI environment.
In the case of Cygwin64 it won't.
> 'how can I make a 32-bit compiled cygwin program run under cygwin64'?
You can't. Nor can anybody else. For a Cygwin64-based program, Cygwin32
is a bona fide cross-compilation platform rather than just some subset
of the same platform. The same holds vice versa.
--
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
next prev parent reply other threads:[~2017-02-02 22:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 21:13 Thomas Nilefalk
2017-02-02 22:10 ` Hans-Bernhard Bröker [this message]
2017-02-03 11:49 ` Thomas Nilefalk
2017-02-03 17:43 ` Hans-Bernhard Bröker
2017-02-10 8:34 ` Thomas Nilefalk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=af15cbdf-cfe5-dba9-e293-844a5de19e6a@t-online.de \
--to=hbbroeker@t-online.de \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).