unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 19111@debbugs.gnu.org
Subject: bug#19111: 25.0.50; 32 bits temacs.exe is linked with wrong image-base when built on 64	bit Windows host
Date: Thu, 20 Nov 2014 19:30:37 +0100	[thread overview]
Message-ID: <87389dragi.fsf@wanadoo.es> (raw)
In-Reply-To: <83mw7l6bjc.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 20 Nov 2014 19:12:55 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> We are using $MSYSTEM to special-case MinGW(-w64). $MSYSTEM is MINGW32
>> when using the 32 bit toolset and MINGW64 when using the 64 bit toolset.
>> That's true for MSYS2/MinGW-w64. I'm not sure if MSYS sets $MSYSTEM to
>> MINGW or MINGW32, but any of it should be ok with the patch.
>> 
>> The -m32 switch is actively discouraged by the MinGW-w64 community and
>> the official builds does not support it.
>> 
>> Does this answer your questions?
>
> Sorry, it doesn't.  You say that $MSYSTEM is set to either MINGW32 or
> MINGW64, depending on whether 32-bit or 64-bit toolset is used.  But
> how does MSYS2 know which toolset you are going to use to compile a
> program?  How do you communicate that to MSYS2?

It is set automatically by the .bat file that starts the MSYS2 shell.
There is a .bat that sets $MSYSTEM, paths, etc for MINGW32, other for
MINGW64 and other for MSYS.

In the end, the user must ensure that $MSYSTEM matches the toolset he is
going to use. This is nothing new. The Emacs build fails if $MSYSTEM is
not correctly set, for MinGW(-w64) builds.

> In any case, what I suggest to do is correct the triplet,
> automatically, after uname guesses it, if we find that it is wrong for
> "the toolset about to be used", whatever that means.

How do we know that the triplet is wrong? The easy way is to inspect
$MSYSTEM, but if that's the solution then we could stop using the
triplet altogether and use $MSYSTEM instead (which is what my patch
does.)

Another solution is to get the --host/--build triplet from `gcc -v' (use
the `--target=...' part. I don't know how it is supposed to deal with
the case of the user setting those parameters explicitly, although I
can't think of a valid reason for setting --host/--build to something
different from the `gcc -v' --target, since Emacs does not support
cross-compiling.

I understand your concern: `configure' can use the triplet anywhere and
hence it is important that it is correct.





  reply	other threads:[~2014-11-20 18:30 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 20:27 bug#19111: 25.0.50; 32 bits temacs.exe is linked with wrong image-base when built on 64 bit Windows host Óscar Fuentes
2014-11-19 20:40 ` Eli Zaretskii
2014-11-19 21:27   ` Óscar Fuentes
2014-11-19 21:50     ` Óscar Fuentes
2014-11-19 22:01       ` Óscar Fuentes
2014-11-20  3:45         ` Eli Zaretskii
2014-11-20  3:43       ` Eli Zaretskii
2014-11-20  3:41     ` Eli Zaretskii
2014-11-20  4:10       ` Óscar Fuentes
2014-11-20 16:05         ` Eli Zaretskii
2014-11-20 16:23           ` Óscar Fuentes
2014-11-20 17:12             ` Eli Zaretskii
2014-11-20 18:30               ` Óscar Fuentes [this message]
2014-11-20 19:12                 ` Dani Moncayo
2014-11-20 21:03                 ` Eli Zaretskii
2014-11-21  0:07                   ` Óscar Fuentes
2014-11-21  8:28                     ` Eli Zaretskii
2014-11-21 14:15                       ` Óscar Fuentes
2014-11-21 15:03                         ` Eli Zaretskii
2014-11-21 16:06                           ` Dani Moncayo
2014-11-21 17:02                             ` Glenn Morris
2014-11-21 17:17                               ` Dani Moncayo
2014-11-21 17:21                                 ` Glenn Morris
2014-11-21 18:12                           ` Óscar Fuentes
2014-11-21 17:56                     ` Dani Moncayo
2014-11-21 18:01                       ` Dani Moncayo
2014-11-21 18:21                         ` Óscar Fuentes
2014-11-21 18:34                           ` Dani Moncayo
2014-11-21 18:41                             ` Óscar Fuentes
2014-11-21 22:54                               ` Óscar Fuentes
2014-11-22  1:05                                 ` Glenn Morris
2014-11-22  1:13                                   ` Óscar Fuentes
2014-11-25  2:38                                     ` Óscar Fuentes
2014-11-25 20:26                                       ` Dani Moncayo
2014-11-25 20:52                                         ` Óscar Fuentes
2014-11-25 21:13                                           ` Dani Moncayo
2014-11-25 23:41                                             ` Óscar Fuentes
2014-11-25 23:46                                               ` Dani Moncayo
2014-11-26  0:00                                                 ` Óscar Fuentes
2014-11-26  3:49                                                   ` Eli Zaretskii
2014-11-26 20:05                                                     ` Dani Moncayo
2014-11-29 10:07                                                       ` Dani Moncayo
2014-11-29 10:32                                                         ` Eli Zaretskii
2014-11-29 18:22                                                           ` Dani Moncayo
2014-11-29 18:31                                                             ` Eli Zaretskii
2014-11-29 19:25                                                               ` Dani Moncayo
2014-11-29 20:23                                                                 ` Eli Zaretskii
2014-11-29 20:37                                                                   ` Dani Moncayo
2014-11-29 20:52                                                                     ` Eli Zaretskii
2014-11-29 16:24                                                         ` Óscar Fuentes
2014-11-29 18:37                                                           ` Dani Moncayo
2014-11-29 18:49                                                             ` Eli Zaretskii
2014-11-29 19:23                                                               ` Dani Moncayo
2014-11-29 19:33                                                                 ` Achim Gratz
2014-11-29 19:41                                                                   ` Andreas Schwab
2014-11-29 19:45                                                                 ` Óscar Fuentes
2014-11-29 20:21                                                                 ` Eli Zaretskii
2014-11-25 23:42                                             ` Dani Moncayo
2014-11-22  8:46                                 ` Dani Moncayo
2014-11-22 10:16                                   ` Eli Zaretskii
2014-11-22 15:11                                   ` Óscar Fuentes

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87389dragi.fsf@wanadoo.es \
    --to=ofv@wanadoo.es \
    --cc=19111@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).