pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/editors/emacs22 Merge my recent fixes to emacs20 and e...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8c02be4e0d67
branches:  trunk
changeset: 356430:8c02be4e0d67
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sat Dec 31 06:11:21 2016 +0000

description:
Merge my recent fixes to emacs20 and emacs21:
   - set ELFSIZE correctly (I still have no idea how this ever worked)
   - insert workaround for gcc5's calloc bug

For some reason I thought emacs22 wasn't affected by these issues, or
I would have done this earlier.

This does not make the package build on -current, but it gets a lot
farther now - it segvs building the quail elisp. I have a feeling
we've seen this problem before also, but if so it was some years back
and I can't remember what it was about.

diffstat:

 editors/emacs22/distinfo                    |   4 +++-
 editors/emacs22/patches/patch-src_gmalloc.c |  22 ++++++++++++++++++++++
 editors/emacs22/patches/patch-src_unexelf.c |  22 ++++++++++++++++++++++
 3 files changed, 47 insertions(+), 1 deletions(-)

diffs (68 lines):

diff -r 49fa3313062e -r 8c02be4e0d67 editors/emacs22/distinfo
--- a/editors/emacs22/distinfo  Fri Dec 30 23:37:40 2016 +0000
+++ b/editors/emacs22/distinfo  Sat Dec 31 06:11:21 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.16 2015/11/03 03:32:15 agc Exp $
+$NetBSD: distinfo,v 1.17 2016/12/31 06:11:21 dholland Exp $
 
 SHA1 (emacs-22.3.tar.gz) = 5e9b3e0205099a83be7198fd43ba1c9442a3feb0
 RMD160 (emacs-22.3.tar.gz) = a7eed5099d0cab25f34152f1b18b5c1b4e2e0746
@@ -27,4 +27,6 @@
 SHA1 (patch-ba) = 066f6e0f1f69e1e477820589d9b9de4a4a168148
 SHA1 (patch-src_Makefile.in) = 656a199e1f2b2fcc7954935c1f9db1861c12bde0
 SHA1 (patch-src_alloc_c) = 72055017f43d1526a90fdb3a02b6c317f488399d
+SHA1 (patch-src_gmalloc.c) = 3d10e1ae9f9d98495a8da47e6051a51ac18aed10
+SHA1 (patch-src_unexelf.c) = 7cff2fa2427821447a375f2f99578466d028322c
 SHA1 (patch-xx) = fe52a07d10e8347a721e20611b527c0d626cde3e
diff -r 49fa3313062e -r 8c02be4e0d67 editors/emacs22/patches/patch-src_gmalloc.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/emacs22/patches/patch-src_gmalloc.c       Sat Dec 31 06:11:21 2016 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_gmalloc.c,v 1.1 2016/12/31 06:11:21 dholland Exp $
+
+Work around bug in gcc 5.x that makes calloc into a call to itself,
+resulting in an infinite loop.
+
+--- src/gmalloc.c.orig 2001-11-04 17:35:43.000000000 +0000
++++ src/gmalloc.c
+@@ -1520,7 +1520,13 @@ calloc (nmemb, size)
+      register __malloc_size_t nmemb;
+      register __malloc_size_t size;
+ {
+-  register __ptr_t result = malloc (nmemb * size);
++  register __ptr_t result;
++
++  result = malloc (nmemb * size);
++#ifdef __GNUC__
++/* Work around a gcc bug that converts calloc into a call to itself. */
++  __asm volatile("" : "+r" (result));
++#endif
+ 
+   if (result != NULL)
+     (void) memset (result, 0, nmemb * size);
diff -r 49fa3313062e -r 8c02be4e0d67 editors/emacs22/patches/patch-src_unexelf.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/emacs22/patches/patch-src_unexelf.c       Sat Dec 31 06:11:21 2016 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_unexelf.c,v 1.1 2016/12/31 06:11:21 dholland Exp $
+
+- Set ELFSIZE correctly (from exec_elf.h)
+
+--- src/unexelf.c~     2008-01-08 04:29:48.000000000 +0000
++++ src/unexelf.c
+@@ -489,12 +489,14 @@ typedef struct {
+ /*
+  * NetBSD does not have normal-looking user-land ELF support.
+  */
++# include <sys/exec_elf.h>
+ # if defined __alpha__ || defined __sparc_v9__
++# ifndef ELFSIZE
+ #  define ELFSIZE     64
+ # else
+ #  define ELFSIZE     32
+ # endif
+-# include <sys/exec_elf.h>
++# endif
+ 
+ # ifndef PT_LOAD
+ #  define PT_LOAD     Elf_pt_load



Home | Main Index | Thread Index | Old Index