From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii 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:12:55 +0200 Message-ID: <83mw7l6bjc.fsf@gnu.org> 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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1416503681 22420 80.91.229.3 (20 Nov 2014 17:14:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2014 17:14:41 +0000 (UTC) Cc: 19111@debbugs.gnu.org To: =?UTF-8?Q?=C3=93scar?= Fuentes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 20 18:14:34 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 1XrVJS-0001v7-Ed for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Nov 2014 18:14:34 +0100 Original-Received: from localhost ([::1]:36500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrVJR-000775-V9 for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Nov 2014 12:14:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrVJ2-0006Yp-OW for bug-gnu-emacs@gnu.org; Thu, 20 Nov 2014 12:14:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrVIw-0003Bu-EA for bug-gnu-emacs@gnu.org; Thu, 20 Nov 2014 12:14:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrVIw-0003Bo-3g for bug-gnu-emacs@gnu.org; Thu, 20 Nov 2014 12:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XrVIv-0003qQ-O6 for bug-gnu-emacs@gnu.org; Thu, 20 Nov 2014 12:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Nov 2014 17:14: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.141650358514692 (code B ref 19111); Thu, 20 Nov 2014 17:14:01 +0000 Original-Received: (at 19111) by debbugs.gnu.org; 20 Nov 2014 17:13:05 +0000 Original-Received: from localhost ([127.0.0.1]:39757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrVI1-0003ot-71 for submit@debbugs.gnu.org; Thu, 20 Nov 2014 12:13:05 -0500 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:49913) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrVHu-0003oO-JY for 19111@debbugs.gnu.org; Thu, 20 Nov 2014 12:13:03 -0500 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NFC00F00KQIP100@mtaout28.012.net.il> for 19111@debbugs.gnu.org; Thu, 20 Nov 2014 19:10:22 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NFC00EXZL191L20@mtaout28.012.net.il>; Thu, 20 Nov 2014 19:10:22 +0200 (IST) In-reply-to: <87a93lrgct.fsf@wanadoo.es> X-012-Sender: halo1@inter.net.il 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:96331 > From: Óscar Fuentes > Cc: 19111@debbugs.gnu.org > Date: Thu, 20 Nov 2014 17:23:14 +0100 > > > OK, but at least let's keep the build/host/target triplet correct. > > It's not right for us to disregard it when it doesn't fit our needs, > > because the entire configure script is based on the notion that the > > triplet is the starting point on which all the rest is based. > > > > So, if we want to fix that, let's fix the triplet early on, to specify > > a i686 build, and let the rest of the script do its job as usual. > > I suspect that you have a point here which I don't entirely grasp. > > Are you thinking on a scenario where the user sets --host/--build on the > configure script to something that doesn't correlate to the contents of > $MSYSTEM? No, I'm trying to follow your suggestion that just "./configure && make" should DTRT. > > Besides, I came to a conclusion that I don't understand how your > > suggestion will work anyway. AFAICT, you just replace tests based on > > one wrong string (x86_64-*-*) with another wrong string (MINGW64). > > > > Or are you saying that MSYS2 somehow magically does not give $MSYSTEM > > the value MINGW64 when you configure for a 32-bit build? If so, how > > does this magic work? Because if MSYS2 always sets MSYSTEM=MINGW64, > > then your suggestion isn't going to work, is it? > > > > More generally, how do you tell configure that you want a 32-bit build > > using MinGW64 toolchain? That requires some special compiler switches > > (like -m32 or some such), no? > > 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? 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.