From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo 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: Wed, 26 Nov 2014 00:42:46 +0100 Message-ID: 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> <87389dragi.fsf@wanadoo.es> <83egsx60um.fsf@gnu.org> <87y4r5pgae.fsf@wanadoo.es> <87ioi8pg84.fsf@wanadoo.es> <87egswpf9p.fsf@wanadoo.es> <87a93kp3lb.fsf@wanadoo.es> <9hwq6o11ud.fsf@fencepost.gnu.org> <87389cox4u.fsf@wanadoo.es> <87mw7gngw8.fsf@wanadoo.es> <87egsrnguj.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1416959004 24164 80.91.229.3 (25 Nov 2014 23:43:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2014 23:43:24 +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 Wed Nov 26 00:43:18 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 1XtPlN-0003fw-DZ for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Nov 2014 00:43:17 +0100 Original-Received: from localhost ([::1]:59922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtPlN-0001ME-2m for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Nov 2014 18:43:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtPlE-0001Lw-3R for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2014 18:43:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtPl8-0002bh-Ba for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2014 18:43:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtPl8-0002bb-8F for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2014 18:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XtPl7-0004oe-TT for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2014 18:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dani Moncayo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Nov 2014 23:43: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.141695897718501 (code B ref 19111); Tue, 25 Nov 2014 23:43:01 +0000 Original-Received: (at 19111) by debbugs.gnu.org; 25 Nov 2014 23:42:57 +0000 Original-Received: from localhost ([127.0.0.1]:45349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtPky-0004oG-Ph for submit@debbugs.gnu.org; Tue, 25 Nov 2014 18:42:56 -0500 Original-Received: from mail-oi0-f47.google.com ([209.85.218.47]:42122) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtPkt-0004o5-Bh for 19111@debbugs.gnu.org; Tue, 25 Nov 2014 18:42:51 -0500 Original-Received: by mail-oi0-f47.google.com with SMTP id v63so1237067oia.34 for <19111@debbugs.gnu.org>; Tue, 25 Nov 2014 15:42:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=j7cFHI6eYuQ9DOmw0v1rlsPC18KG8UUcb54+fKqJnm0=; b=Hsi+UCU4ICKtCrITka3zrSrPUpP9exfcA0PLoft5oYqv4ywIOlIRaEQBIl6jQmuCt+ G656Wx/QpaCmDAYtEOMPfkRbKP1NUrjo5yixqQEZMH8I4qhPgCnnprzA4mGVuwLXMXVd eh1aYSvcAu5kYTUTMvBJ0xiqP6+/eYjD5lSaQ9bojDnYZy0e2pGjZPI+CPWDdXCvMv0X UCzfGkHcJxr584Xf2rYtNzf+UCEnQ6q+XVtZNY56kZG5uht6Q2IBoiKVPncf7c+ZbeXN OTMGxiZp0SVIVJqExTrZTtJ0aWUIXLntgRRdY4oy6owao3xy37M74STYNsXQw7Bj6a09 hcnQ== X-Received: by 10.202.81.202 with SMTP id f193mr3792250oib.1.1416958966510; Tue, 25 Nov 2014 15:42:46 -0800 (PST) Original-Received: by 10.60.47.84 with HTTP; Tue, 25 Nov 2014 15:42:46 -0800 (PST) In-Reply-To: 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:96580 Archived-At: Another detail that I think is wrong in the MinGW-specific block of code is this: if a --host parameter was given to 'configure', there is no need to update anything there. So, here is the last version of my proposed patch: ------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 8830ec7..3814104 100644 --- a/configure.ac +++ b/configure.ac @@ -137,42 +137,44 @@ AM_INIT_AUTOMAKE(1.11) dnl Canonicalize the configuration name. AC_CANONICAL_HOST -canonical=$host -configuration=${host_alias-${build_alias-$host}} -dnl We get MINGW64 with MSYS2, MINGW32 with MSYS. -case $canonical in +case $host in *-mingw*) - . $srcdir/nt/mingw-cfg.site - # When we build with MinGW under MSYS, we are cross-compiling. Hence - # we can't rely on the output of MSYS `uname' for the architecture - # (32 bit MinGW compiler with 64 bit MSYS2, for instance) and must - # use the compiler's target, unless when the user explicitly - # provides one: - if test -z $target_alias; then + # We are building with a MSYS[2]/MinGW[-w64] toolchain. + + if test -z "$host_alias"; then + + # No --host argument was given, but we cannot rely on the + # current value of '$host', because it is based on the MSYS[2] + # environment ('i686-pc-mingw32' on MSYS and MSYS2-i686, and + # 'x86_64-pc-mingw64' on MSYS2-x86_64), which may not match + # the actual compiler's target. E.g. building with MSYS2-x86_64 + # and MinGW-i686. Therefore, we have to check the compiler's + # target. + AC_MSG_CHECKING([the compiler's target]) - if test -z $CC; then + if test -z "$CC"; then cc=gcc else cc=$CC fi t=`$cc -v 2>&1 | sed -n 's/Target: //p'` case "$t" in - *-*) canonical=$t + *-*) host=$t ;; "") AC_MSG_ERROR([Impossible to obtain $cc compiler target. -Please explicitly provide --target]) +Please explicitly provide --host.]) ;; *) AC_MSG_WARN([Compiler reported non-standard target. -Defaulting to $canonical.]) +Defaulting to $host.]) ;; esac - AC_MSG_RESULT([$canonical]) - else - canonical=$target_alias + AC_MSG_RESULT([$host]) fi + . $srcdir/nt/mingw-cfg.site + case $srcdir in /* | ?:*) # srcdir is an absolute path. In this case, force the format @@ -185,6 +187,9 @@ Defaulting to $canonical.]) esac;; esac +canonical=$host +configuration=${host_alias-${build_alias-$host}} + dnl Support for --program-prefix, --program-suffix and dnl --program-transform-name options AC_ARG_PROGRAM ------------------------------------------------------- -- Dani Moncayo