From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C3=93scar?= Fuentes Newsgroups: gmane.emacs.bugs 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 Message-ID: <87389dragi.fsf@wanadoo.es> References: <87fvdfrl4p.fsf@telefonica.net> <83k32q7wkl.fsf@gnu.org> <87bno2swxp.fsf@wanadoo.es> <83egsy7d2x.fsf@gnu.org> <87siheqzq9.fsf@wanadoo.es> <83389d7t89.fsf@gnu.org> <87a93lrgct.fsf@wanadoo.es> <83mw7l6bjc.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416508310 1287 80.91.229.3 (20 Nov 2014 18:31:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2014 18:31:50 +0000 (UTC) Cc: 19111@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 20 19:31:42 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XrWW6-0001yT-MI for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Nov 2014 19:31:42 +0100 Original-Received: from localhost ([::1]:36834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrWW6-0003eX-9p for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Nov 2014 13:31:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrWVw-0003dE-Ru for bug-gnu-emacs@gnu.org; Thu, 20 Nov 2014 13:31:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrWVS-0006Sz-Ih for bug-gnu-emacs@gnu.org; Thu, 20 Nov 2014 13:31:32 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrWVS-0006SE-45 for bug-gnu-emacs@gnu.org; Thu, 20 Nov 2014 13:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XrWVR-0005fK-Qm for bug-gnu-emacs@gnu.org; Thu, 20 Nov 2014 13:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Nov 2014 18:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19111 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19111-submit@debbugs.gnu.org id=B19111.141650824421753 (code B ref 19111); Thu, 20 Nov 2014 18:31:01 +0000 Original-Received: (at 19111) by debbugs.gnu.org; 20 Nov 2014 18:30:44 +0000 Original-Received: from localhost ([127.0.0.1]:39787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrWVA-0005en-1W for submit@debbugs.gnu.org; Thu, 20 Nov 2014 13:30:44 -0500 Original-Received: from relaycp02.dominioabsoluto.net ([217.116.26.74]:57307) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrWV6-0005ed-CB for 19111@debbugs.gnu.org; Thu, 20 Nov 2014 13:30:42 -0500 Original-Received: from smtp.movistar.es (smtp10.acens.net [86.109.99.134]) by relaycp02.dominioabsoluto.net (Postfix) with ESMTP id C69E7D2AB3; Thu, 20 Nov 2014 20:07:52 +0100 (CET) X-CTCH-RefID: str=0001.0A0B0205.546E334E.037D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-Spam: Unknown Original-Received: from qcore (79.158.48.132) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 5453978C00A5C67E; Thu, 20 Nov 2014 18:30:38 +0000 In-Reply-To: <83mw7l6bjc.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 20 Nov 2014 19:12:55 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96337 Eli Zaretskii 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.