public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: LRN <lrn1986@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Is our use of Cygwin to build & run OpenOCD a good one?
Date: Sun, 19 May 2019 20:53:00 -0000	[thread overview]
Message-ID: <709ae9ed-3eb9-f78b-10f0-fd05585f0c7d@gmail.com> (raw)
In-Reply-To: <ad7a93aa-d688-d177-bdf2-d368f2acbbd0@mindchasers.com>


[-- Attachment #1.1: Type: text/plain, Size: 2367 bytes --]

On 19.05.2019 22:43, Bob Cochran wrote:
> And, I received the 
> following feedback:
> 
> "Cygwin? this is probably still functional, but now can be considered a 
> (pre)historic solution."
> 
> I personally have been using Cygwin for many years and have come to 
> trust it for interfacing to Linux and macOS boxes from Windows.  I think 
> it's a great project, so when I wanted to build & run OpenOCD from 
> scratch, I naturally went to Cygwin.
> 
> I would appreciate any feedback on our use of Cygwin for building & 
> running OpenOCD: https://mindchasers.com/dev/openocd-darsena-windows
> 

Cygwin allows you to compile programs written for *nix (specifically - for
Linux) with [almost] no changes to the source code, producing Windows
executables that run on Windows. That is achieved by using a compatibility
runtime (the Cygwin DLL).

This is useful if:
1) The code you're compiling is not Windows-compatible (i.e. can't be compiled
with MinGW against MinGW SDK).
2) You're OK with a dependence on Cygwin runtime
3) You're OK with a possible performance hit that the runtime incurs. The
amount of the performance you lose varies; might be negligible; might be
significant - depends on what the code does.

I grepped OpenOCD code, and it seems to me that it is Windows-compatible
(README.Windows even says so explicitly). In that case you should probably
cross-compile it to Windows (see autotools documentation on cross-compilation).
You *can* cross-compile from Cygwin, but cross-compiling from *nix will be
wa-a-ay faster.

You can also use MSYS2 to compile it on Windows (without doing
cross-compilation). Most likely the process won't be any faster than
cross-compiling from Cygwin.

Since OpenOCD uses autotools, these are your only options (if it were using
CMake or Meson, you might have been able to build at least the binaries with
just MinGW-w64 SDK and the buildsystem; but for autotools you need a
fully-functional POSIX shell, meaning Cygwin, MSYS2 or the real *nix shell
running on *nix).

There's also the modern, "hip" way of using Windows POSIX subsystem (these days
it's called "WSL", i think?) to run the necessary tools, but don't see any
significant practical advantages to doing that (you still can't get zero-cost
fork this way), whereas ethical ramifications might be significant.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-05-19 20:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-19 19:44 Bob Cochran
2019-05-19 20:53 ` LRN [this message]
2019-05-19 21:21 ` Brian Inglis
2019-05-20 14:16 ` Erik Soderquist
2019-05-20 14:27   ` Jose Isaias Cabrera
2019-05-20 18:49     ` Bob Cochran
2019-05-21 17:55       ` LRN
2019-05-21 18:21         ` Jose Isaias Cabrera
2019-05-22  6:05         ` Bob Cochran
2019-05-22 21:35           ` Andrey Repin
2019-05-23  1:47             ` Brian Inglis
2019-05-23  1:52             ` Brian Inglis
2019-05-23  1:55             ` Brian Inglis
2019-05-20 17:54 ` Achim Gratz

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=709ae9ed-3eb9-f78b-10f0-fd05585f0c7d@gmail.com \
    --to=lrn1986@gmail.com \
    --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).