public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Yaakov (Cygwin/X)" <yselkowitz@users.sourceforge.net>
To: cygwin@cygwin.com
Subject: Re: RFD: cygwin + *native* MinGW compiler
Date: Wed, 28 Jan 2009 11:21:00 -0000	[thread overview]
Message-ID: <49801FCB.9030303@users.sourceforge.net> (raw)
In-Reply-To: <49800695.8070503@cwilson.fastmail.fm>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Charles Wilson wrote:
> Right, if I'm building a compiler.  I'm not -- although that wasn't very
> clear, since the only examply I gave was Danny's incantation for
> building gcc, a compiler.  Oops.
> 
> I'm talking about building, say, ncurses so that it will run "natively"
> (that is, in the mingw environment without cygwin).  The question is,
> what assumptions should be made about the compiler that is used to
> compile ncurses, when you configure ncurses using --build= --target=?
> Does that compiler  understand /cygdrive/c/foo, or C:\foo?

That's a totally different story.  I think that would be obvious;
- --build=cygwin --target=mingw32 should mean you're using a Cygwin-based
MinGW cross-compiler.  AFAIK that's consistent with other platform
combinations.

> Only compilers and linkers have --targets.  Everything else, you
> (cross)compile using build/host (or just host; build is implicit). So,
> the implication of the suggestion above is that:
> 
> ../ncurses/configure --build=cygwin --host=mingw32
> 
> would mean that the gcc involved runs on the cygwin build platform, and
> understands /cygdrive/c/foo, but the ncurses library and tools will be
> native mingw32 and will only understand C:\foo. That is, it is a
> cygwin->mingw cross compiler. (Bringing this down to earth:
> specifically, when libtool is creating a wrapper executable -- say, for
> tic.exe -- using the cross-compiler, the wrapper exe will be a native
> win32 prog, and will need the DOS path to the exe it needs to "wrap".
> Not the cygwin path -- and libtool should use cygpath to obtain that DOS
> path).

Right.

> OTOH,
> 
> ../ncurses/configure --build=mingw32 --host=mingw32
> 
> would mean that the compiler TOO only understands C:\foo. That is, it is
> a native MinGW compiler as distributed by the MinGW team.  (Back to
> earth: specifically, when libtool is creating a wrapper executable using
> this "native" compiler, the wrapper exe will be a native win32 prog, and
> will need the DOS path to the exe it needs to "wrap". However, because
> of the oddities of "MinGW" $build -- it's actually msys, and has its own
> idea of a unix-like path -- libtool will need to convert that unix-like
> path to DOS format using the msys mechanism to do so. NOT cygpath).

So far so good.

> These are both logical scenarios, and represent the "normal" way of
> interpreting build/host for an cross-compile or native setup [other than
> the utter weirdness that is msys].  However...and here's the rub...until
> now the various win32 "hosted" platforms have been rather lax about
> these distinctions.  So, for instance, Danny can currently get away with
> the following:
> 
> cygwin-machine$ ../gcc/configure --build=mingw32 --host=ming32
> --target=mingw32
> 
> even though $build is NOT, actually, mingw32 (or even msys). It's
> cygwin. Enforcing the "normal" interpretation will break that usage
> (Back to earth: because the "wrong" mechanism (msys->mingw, instead of
> the true cygwin->mingw) to convert unix-like paths to the DOS path
> needed by the wrapper exe will be used. Don't lie to your tools about
> their $build environment...)
>
> Maybe this usage *should* be broken (or strongly discouraged, with an
> esoteric workaround for those who insist on mistreating their tools). I
> dunno.

Of course it's broken, period.  And just like all the other
misconceptions around Cygwin, I don't see why it we shouldn't be allowed
to fix it.

> Seems kinda harsh, to break something that currently works (even if it
> is evil) -- and the point of this thread, really, is to see how many
> people use cygwin + mingw in situations where they may be tempted to --
> or already do -- lie to their configure scripts about $build.

WJM. :-)  But as we're (finally!) abandoning the long-broken
- -mno-cygwin, I don't see why we can't dump this breakage as well.


Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREIAAYFAkmAH8sACgkQpiWmPGlmQSPTwQCghn3w7Sr2ojNXQTdiizeIr9Qu
f8cAoPKk8R710du8gOFvFYDJuMAkGEUY
=7g0F
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

  reply	other threads:[~2009-01-28  9:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28  4:38 Charles Wilson
2009-01-28  5:29 ` Christopher Faylor
2009-01-28  6:14 ` Warren Young
2009-01-28  6:55 ` Greg Chicares
2009-01-28  7:18   ` Charles Wilson
2009-01-28  9:05     ` Yaakov (Cygwin/X)
2009-01-28 11:10       ` Charles Wilson
2009-01-28 11:21         ` Yaakov (Cygwin/X) [this message]
2009-01-28 15:19       ` Christopher Faylor
2009-01-28 23:08     ` Greg Chicares
2009-01-29  9:44       ` Charles Wilson
2009-02-11  2:34         ` Greg Chicares
2009-01-28 15:15 ` Ralph Hempel
2009-01-28 15:18   ` Vincent R.
2009-01-28 15:26     ` Christopher Faylor
2009-01-28 16:08 ` Roger Wells
2009-01-28 16:40 ` Claude Sylvain
2009-01-28 17:22 ` Reini Urban
2009-01-28 23:47 ` Kai Raphahn
2009-01-29  9:52 Danny Smith
2009-01-29 12:29 ` Charles Wilson
2009-01-29 15:13   ` Charles Wilson

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=49801FCB.9030303@users.sourceforge.net \
    --to=yselkowitz@users.sourceforge.net \
    --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).