all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: 17176@debbugs.gnu.org
Subject: bug#17176: 24.3.50; Problem with manifests on cygw32 build with new binutils
Date: Wed, 02 Apr 2014 15:07:23 -0400	[thread overview]
Message-ID: <533C5FEB.7090408@cornell.edu> (raw)

binutils has changed so that, on Cygwin, executables have a manifest 
built in by default.  A consequence is that the cygw32 build of emacs 
produces an emacs.exe which, after it is stripped, won't run:

$ ./emacs-stripped.exe
-bash: ./emacs-stripped.exe: cannot execute binary file

This is presumably caused by the fact that the cygw32 build already 
incorporates a manifest via nt/emacs.res.  The following patch fixes 
this and does some related manifest-related cleanup:

=== modified file 'configure.ac'
--- configure.ac        2014-03-27 21:29:32 +0000
+++ configure.ac        2014-04-02 17:47:41 +0000
@@ -1834,11 +1834,6 @@
    W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
    W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
    EMACSRES="emacs.res"
-  case "$canonical" in
-    x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
-    *) EMACS_MANIFEST="emacs-x86.manifest" ;;
-  esac
-  UPDATE_MANIFEST=update-game-score.exe.manifest
    if test "${opsys}" = "cygwin"; then
      W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
      W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
@@ -1846,6 +1841,11 @@
      # the rc file), not a linker script.
      W32_RES_LINK="-Wl,emacs.res"
    else
+    case "$canonical" in
+      x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
+      *) EMACS_MANIFEST="emacs-x86.manifest" ;;
+    esac
+    UPDATE_MANIFEST=update-game-score.exe.manifest
      W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
      W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
      W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"

=== modified file 'nt/emacs.rc'
--- nt/emacs.rc 2014-03-21 10:12:53 +0000
+++ nt/emacs.rc 2014-04-02 18:30:53 +0000
@@ -1,10 +1,12 @@
  Emacs ICON   icons/emacs.ico
  32649 CURSOR icons/hand.cur
-#if defined (WIN64) || defined (__x86_64__)
+#ifndef __CYGWIN__
+#ifdef WIN64
  1 24 "emacs-x64.manifest"
  #else
  1 24 "emacs-x86.manifest"
  #endif
+#endif

  #ifndef VS_VERSION_INFO
  #define VS_VERSION_INFO 1

=== modified file 'src/Makefile.in'
--- src/Makefile.in     2014-01-12 17:27:17 +0000
+++ src/Makefile.in     2014-04-02 18:29:50 +0000
@@ -259,7 +259,7 @@

  ## emacs.res if HAVE_W32
  EMACSRES = @EMACSRES@
-## emacs-*.manifest if HAVE_W32
+## emacs-*.manifest if WINDOWSNT
  EMACS_MANIFEST = @EMACS_MANIFEST@
  ## If HAVE_W32, compiler arguments for including
  ## the resource file in the binary.


OK to apply to the emacs-24 branch?

Ken





             reply	other threads:[~2014-04-02 19:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 19:07 Ken Brown [this message]
2014-04-02 19:38 ` bug#17176: 24.3.50; Problem with manifests on cygw32 build with new binutils Daniel Colascione
2014-04-02 20:29 ` Eli Zaretskii
2014-04-02 20:59   ` Eli Zaretskii
2014-04-02 22:19     ` Ken Brown
2014-04-03  2:48       ` Eli Zaretskii
2014-04-03 12:50         ` Ken Brown
2014-04-03 19:12           ` Ken Brown

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

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

  git send-email \
    --in-reply-to=533C5FEB.7090408@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=17176@debbugs.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.