bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19111: 25.0.50; 32 bits temacs.exe is linked with wrong image-base w


From: Óscar Fuentes
Subject: bug#19111: 25.0.50; 32 bits temacs.exe is linked with wrong image-base when built on 64 bit Windows host
Date: Fri, 21 Nov 2014 01:07:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> If the user sets the triplet, it should be obeyed.  If it's incorrect,
> that's the user's problem.
>
>> I understand your concern: `configure' can use the triplet anywhere and
>> hence it is important that it is correct.
>
> Yes, exactly.
>
> Could you propose a patch along these lines?

Something like this, perhaps? (It should also work for Dani's Cygwin
case.)

diff --git a/configure.ac b/configure.ac
index 5d71c2f..8efde0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,6 +145,29 @@ case $canonical 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
+      AC_MSG_CHECKING([the compiler's target])
+      if test -z $CC; then
+         cc=gcc
+      else
+         cc=$CC
+      fi
+      t=$($cc -v 2>&1 | grep "^Target: ")
+      t=${t#Target: }
+      if test "x$t" = "x"; then
+         AC_MSG_ERROR([Impossible to determine $cc compiler target.
+Please explicitly provide --target])
+      fi
+      canonical=$t
+      AC_MSG_RESULT([$canonical])
+  else
+      canonical=$target_alias
+  fi
+
   case $srcdir in
     /* | ?:*)
       # srcdir is an absolute path.  In this case, force the format





reply via email to

[Prev in Thread] Current Thread [Next in Thread]