From: Thomas Nilefalk <thomas@junovagen.se>
To: cygwin@cygwin.com
Subject: Providing cygwin1.dll in both 32- and 64-bit versions
Date: Thu, 02 Feb 2017 21:13:00 -0000 [thread overview]
Message-ID: <5893A0CD.5090107@junovagen.se> (raw)
I'm cross-compiling on Cygwin64 to 32-bit. Or rather I'm trying to
figure out what compiling to 32-bits on a Cygwin64 actually means.
Using 'gcc -m32' causes a lot of "skipping incompatible ..." for a lot
of libraries, so obviously ld then looks for the 32-bit libraries in the
"wrong" place.
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? 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'. I'm not sure that makes
sense or is even possible, but if it is not, then the question becomes
'how can I make a 32-bit compiled cygwin program run under cygwin64'?
One way to answer that is to say "export
PATH=<path_to_32_bit_cygwin1.dll>:$PATH" but that requires installing
cygwin32.
I understand that could be the semantics of "cross-compilation" (you
could compile for any platform, and can't expect that to run in your
host environment), but then I'd like to propose that "-m32" should/could
mean compile for host using 32-bit restrictions.
Which part of this is true? Is there a bug with "-m32" or am I just
misunderstanding everything?
/Thomas
--
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 reply other threads:[~2017-02-02 21:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 21:13 Thomas Nilefalk [this message]
2017-02-02 22:10 ` Hans-Bernhard Bröker
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=5893A0CD.5090107@junovagen.se \
--to=thomas@junovagen.se \
--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).