summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2011-12-02 13:16:31 +0000
committertron <tron@pkgsrc.org>2011-12-02 13:16:31 +0000
commita52fbf78d44971ec4b525566c9386da041f66d5b (patch)
tree2d54c9ba99d1400c47d5b8bccaa39baaf96b208e
parent8e72c11c62a109381b30e8f3868f022948db7777 (diff)
downloadpkgsrc-a52fbf78d44971ec4b525566c9386da041f66d5b.tar.gz
Pullup ticket #3617 - requested by dholland
editors/emacs20: bug fix patch Revisions pulled up: - editors/emacs20/distinfo 1.19-1.22 - editors/emacs20/patches/patch-ab 1.4 - editors/emacs20/patches/patch-bm 1.2-1.4 - editors/emacs20/patches/patch-cb deleted --- Module Name: pkgsrc Committed By: dholland Date: Thu Dec 1 04:05:41 UTC 2011 Modified Files: pkgsrc/editors/emacs20: distinfo pkgsrc/editors/emacs20/patches: patch-ab Log Message: Patch up configure tests for cpp to avoid problems when running gcc 4.5's cpp on makefiles. PR 45669. Unfortunately, this does not by itself fix the build; now I'm getting ./temacs -batch -l loadup dump gmake[1]: *** [emacs] Segmentation fault and I have a bad feeling that this may be the same issue that the other emacs versions are sometimes hitting. --- Module Name: pkgsrc Committed By: dholland Date: Thu Dec 1 04:51:30 UTC 2011 Modified Files: pkgsrc/editors/emacs20: distinfo pkgsrc/editors/emacs20/patches: patch-bm Removed Files: pkgsrc/editors/emacs20/patches: patch-cb Log Message: Fold patch-cb into patch-bm since they patch the same file. Related to PR 45669. hi joerg! --- Module Name: pkgsrc Committed By: dholland Date: Thu Dec 1 05:07:23 UTC 2011 Modified Files: pkgsrc/editors/emacs20: distinfo pkgsrc/editors/emacs20/patches: patch-bm Log Message: Add __asm __volatile("":::"memory") at a critical point in alloc.c. gcc thinks it knows the semantics of malloc and so it thinks it can optimize out the manipulation of __malloc_hook; however, doing so causes the subsequent malloc call to come back to itself, leading to an infinite recursion and SIGSEGV in temacs. This fixes the remaining part of PR 45669. Someone(TM) should check if this issue affects other Emacs versions and/or XEmacs. --- Module Name: pkgsrc Committed By: dholland Date: Thu Dec 1 05:12:57 UTC 2011 Modified Files: pkgsrc/editors/emacs20: distinfo pkgsrc/editors/emacs20/patches: patch-bm Log Message: Extend previous to realloc and free as well, which is almost certainly necessary. PR 45669.
-rw-r--r--editors/emacs20/distinfo7
-rw-r--r--editors/emacs20/patches/patch-ab72
-rw-r--r--editors/emacs20/patches/patch-bm46
-rw-r--r--editors/emacs20/patches/patch-cb13
4 files changed, 112 insertions, 26 deletions
diff --git a/editors/emacs20/distinfo b/editors/emacs20/distinfo
index a9405a1db51..d80348088a8 100644
--- a/editors/emacs20/distinfo
+++ b/editors/emacs20/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2011/08/01 05:44:26 dholland Exp $
+$NetBSD: distinfo,v 1.18.2.1 2011/12/02 13:16:31 tron Exp $
SHA1 (emacs-20.7-mule-4.1b-elc.tar.gz) = 3894fb2b81bb326545f6ccc3bf0a8405c23004ff
RMD160 (emacs-20.7-mule-4.1b-elc.tar.gz) = c675b31dafaa4321a453af9d87eddf051ee71b1f
@@ -13,7 +13,7 @@ SHA1 (emacs20-xim-20000713.diff) = 5bed39e7b8a52941f77088529566aaa3bcf06670
RMD160 (emacs20-xim-20000713.diff) = 5887a4d43ee92e8cad65d6412c9ecbce08e781da
Size (emacs20-xim-20000713.diff) = 21296 bytes
SHA1 (patch-aa) = 3b3fd76c058a0a46e0458338ce4c2327a238fb3d
-SHA1 (patch-ab) = 3d9497d4894cd126ca49636d9adfdd14cc31b017
+SHA1 (patch-ab) = 2ef7b4d9c7a192ebd00efc85f94d8e7d116cf0b7
SHA1 (patch-ac) = abf5971279a8d875504be4c17b8d36cb8cc24885
SHA1 (patch-ad) = dd21028a6360ccfb442ecced4c67717f60ea78a6
SHA1 (patch-ae) = 26b8b56822d343d33330f426d83951b8fec074fa
@@ -47,7 +47,7 @@ SHA1 (patch-bi) = d97512603b313ee730687e3b5680d45002ade51c
SHA1 (patch-bj) = 6dba88723ee632b67fcf6a2dd2918e69034837e2
SHA1 (patch-bk) = 7582e915a5bd9778259961e7fa842d5cdce3e85c
SHA1 (patch-bl) = f2cd03713d7cdb6cb41119569031249d7d708b13
-SHA1 (patch-bm) = 148b3148587a31ec7a0674c5c1a359e8f09d952f
+SHA1 (patch-bm) = 2f00f63120a90477c6f5c63ac6ca23fc508b9e54
SHA1 (patch-bn) = 247c04ae1accf3bc6b07b22767eb3cf2cdb55013
SHA1 (patch-bo) = f9b8b73af91a445dbf50f9e862b84c7abc2b730e
SHA1 (patch-bp) = 9091134cf50e17ce58976c3193666e716345a124
@@ -62,7 +62,6 @@ SHA1 (patch-bx) = 27713e1812240f9ed137aa793cbb5a4fa2cad33b
SHA1 (patch-by) = a383206a32e902c448a1b529cf1eefc485f5beab
SHA1 (patch-bz) = c395a2acb2aa1e2c1582f6bb46a32bcfa4661b85
SHA1 (patch-ca) = e9c9929ea5f16ac9f4bec09f2bf8e4e28578702d
-SHA1 (patch-cb) = a7e3926f4b8a107e004b731f2064493e7d436cd4
SHA1 (patch-cc) = 2b474603b922383b6d239e7e2e14f144bd52df6b
SHA1 (patch-cd) = 22b29708e0730275984dc2d8e7a304932d6b66fb
SHA1 (patch-ce) = df4d2a5639a72d2c719662496f17db35686f4ac2
diff --git a/editors/emacs20/patches/patch-ab b/editors/emacs20/patches/patch-ab
index 1e753f40b56..c7f5259d76b 100644
--- a/editors/emacs20/patches/patch-ab
+++ b/editors/emacs20/patches/patch-ab
@@ -1,4 +1,10 @@
-$NetBSD: patch-ab,v 1.3 2006/01/04 17:00:32 joerg Exp $
+$NetBSD: patch-ab,v 1.3.50.1 2011/12/02 13:16:31 tron Exp $
+
+Caution: the extra cpp checking (the three hunks containing "Should be
+one line") is manually hacked and not reflected in configure.in; do
+not regenerate configure with autoconf without merging it. This
+checking is required because somewhere between gcc 4.1 and 4.5 cpp
+started doing regrettable things with backslash-escaped newlines.
--- configure.orig 2000-06-12 20:05:56.000000000 +0000
+++ configure
@@ -48,7 +54,65 @@ $NetBSD: patch-ab,v 1.3 2006/01/04 17:00:32 joerg Exp $
*-nextstep* ) opsys=nextstep ;;
## Otherwise, we'll fall through to the generic opsys code at the bottom.
esac
-@@ -3823,6 +3837,53 @@ else
+@@ -1916,15 +1930,21 @@ else
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
++ # And, gcc 4.5? and up does not preserve escaped newlines, which is
++ # fatal for preprocessing makefiles.
+ cat > conftest.$ac_ext <<EOF
+ #line 1921 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
++Should \\
++be one line.
+ EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++ac_try="$ac_cpp conftest.$ac_ext >conftest2.out 2>conftest.out"
+ { (eval echo configure:1927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"; \
++ grep -L "Should *be one line" conftest2.out \
++ `
+ if test -z "$ac_err"; then
+ :
+ else
+@@ -1938,10 +1958,14 @@ else
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
++Should \\
++be one line.
+ EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++ac_try="$ac_cpp conftest.$ac_ext >conftest2.out 2>conftest.out"
+ { (eval echo configure:1944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"; \
++ grep -L "Should *be one line" conftest2.out \
++ `
+ if test -z "$ac_err"; then
+ :
+ else
+@@ -1955,10 +1979,14 @@ else
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
++Should \\
++be one line.
+ EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++ac_try="$ac_cpp conftest.$ac_ext >conftest2.out 2>conftest.out"
+ { (eval echo configure:1961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"; \
++ grep -L "Should *be one line" conftest2.out \
++ `
+ if test -z "$ac_err"; then
+ :
+ else
+@@ -3823,6 +3851,53 @@ else
echo "$ac_t""no" 1>&6
fi
@@ -102,7 +166,7 @@ $NetBSD: patch-ab,v 1.3 2006/01/04 17:00:32 joerg Exp $
LIBS="$OLDLIBS"
fi
-@@ -4906,6 +4967,64 @@ EOF
+@@ -4906,6 +4981,64 @@ EOF
fi
@@ -167,7 +231,7 @@ $NetBSD: patch-ab,v 1.3 2006/01/04 17:00:32 joerg Exp $
# Set up the CFLAGS for real compilation, so we can substitute it.
CFLAGS="$REAL_CFLAGS"
-@@ -5211,6 +5330,7 @@ s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+@@ -5211,6 +5346,7 @@ s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@YACC@%$YACC%g
s%@SET_MAKE@%$SET_MAKE%g
diff --git a/editors/emacs20/patches/patch-bm b/editors/emacs20/patches/patch-bm
index cfb21861577..aacf072a95d 100644
--- a/editors/emacs20/patches/patch-bm
+++ b/editors/emacs20/patches/patch-bm
@@ -1,12 +1,18 @@
-$NetBSD: patch-bm,v 1.1.1.1 2003/04/11 00:31:45 uebayasi Exp $
+$NetBSD: patch-bm,v 1.1.1.1.68.1 2011/12/02 13:16:31 tron Exp $
---- ./src/alloc.c.orig Thu Sep 16 00:20:15 1999
-+++ ./src/alloc.c Tue Sep 26 11:54:24 2000
-@@ -53,12 +53,13 @@
+- use standard headers
+- fix type of __malloc_extra_blocks
+- add an empty asm() destroying memory that prevents gcc from
+ optimizing out __malloc_hook and friends (which leads to
+ SIGSEGV in temacs during build)
+
+--- src/alloc.c.orig 1999-09-16 07:20:15.000000000 +0000
++++ src/alloc.c
+@@ -53,12 +53,13 @@ extern char *sbrk ();
#if defined (__STDC__) && __STDC__
#include <stddef.h>
-+#include <malloc.h>
++#include <stdlib.h>
#define __malloc_size_t size_t
#else
#define __malloc_size_t unsigned int
@@ -17,3 +23,33 @@ $NetBSD: patch-bm,v 1.1.1.1 2003/04/11 00:31:45 uebayasi Exp $
#endif /* !defined(DOUG_LEA_MALLOC) */
#define max(A,B) ((A) > (B) ? (A) : (B))
+@@ -380,6 +381,9 @@ emacs_blocked_free (ptr)
+ {
+ BLOCK_INPUT;
+ __free_hook = old_free_hook;
++#ifdef __GNUC__
++ __asm __volatile("":::"memory");
++#endif
+ free (ptr);
+ /* If we released our reserve (due to running out of memory),
+ and we have a fair amount free once again,
+@@ -420,6 +424,9 @@ emacs_blocked_malloc (size)
+
+ BLOCK_INPUT;
+ __malloc_hook = old_malloc_hook;
++#ifdef __GNUC__
++ __asm __volatile("":::"memory");
++#endif
+ #ifdef DOUG_LEA_MALLOC
+ mallopt (M_TOP_PAD, malloc_hysteresis * 4096);
+ #else
+@@ -441,6 +448,9 @@ emacs_blocked_realloc (ptr, size)
+
+ BLOCK_INPUT;
+ __realloc_hook = old_realloc_hook;
++#ifdef __GNUC__
++ __asm __volatile("":::"memory");
++#endif
+ value = (void *) realloc (ptr, size);
+ __realloc_hook = emacs_blocked_realloc;
+ UNBLOCK_INPUT;
diff --git a/editors/emacs20/patches/patch-cb b/editors/emacs20/patches/patch-cb
deleted file mode 100644
index 74979cf71f3..00000000000
--- a/editors/emacs20/patches/patch-cb
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-cb,v 1.1 2007/08/04 12:19:23 joerg Exp $
-
---- src/alloc.c.orig 2007-08-04 11:48:13.000000000 +0000
-+++ src/alloc.c
-@@ -53,7 +53,7 @@ extern char *sbrk ();
-
- #if defined (__STDC__) && __STDC__
- #include <stddef.h>
--#include <malloc.h>
-+#include <stdlib.h>
- #define __malloc_size_t size_t
- #else
- #define __malloc_size_t unsigned int