Two fixes: (1) set ELFSIZE correctly (I have no idea how this ever worked)
and (2) work around the problem where gcc 5.x compiles calloc into a call to itself. PKGREVISION -> 21.
This commit is contained in:
parent
70ef518a1b
commit
ac60e264c1
4 changed files with 42 additions and 20 deletions
|
@ -1,8 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.54 2016/11/11 09:10:41 maya Exp $
|
||||
# $NetBSD: Makefile,v 1.55 2016/11/26 03:50:16 dholland Exp $
|
||||
|
||||
DISTNAME= emacs-20.7
|
||||
PKGNAME= ${DISTNAME:S/emacs/emacs20/}
|
||||
PKGREVISION= 20
|
||||
PKGREVISION= 21
|
||||
CATEGORIES= editors
|
||||
MASTER_SITES= http://ftp.gnu.org/pub/old-gnu/emacs/ \
|
||||
ftp://ftp.gnu.org/pub/old-gnu/emacs
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.32 2015/11/03 03:32:15 agc Exp $
|
||||
$NetBSD: distinfo,v 1.33 2016/11/26 03:50:16 dholland Exp $
|
||||
|
||||
SHA1 (emacs-20.7-mule-4.1b-elc.tar.gz) = 3894fb2b81bb326545f6ccc3bf0a8405c23004ff
|
||||
RMD160 (emacs-20.7-mule-4.1b-elc.tar.gz) = c675b31dafaa4321a453af9d87eddf051ee71b1f
|
||||
|
@ -36,7 +36,7 @@ SHA1 (patch-am) = 12667ef175d1108aa3d207d92eba0f20de9d6ae3
|
|||
SHA1 (patch-ao) = bd9808c0b8026508699ebb55db8bc766bd54e193
|
||||
SHA1 (patch-ax) = 572eed7ad29d0b2a2e82e53c1acdfab39c12b1b2
|
||||
SHA1 (patch-ay) = bc91b0759ce0b3f3c1be542c043748472cb8d8fc
|
||||
SHA1 (patch-az) = 643f927b726d825238b14cd6a4b70e3a0722104e
|
||||
SHA1 (patch-az) = a53cdfdb21e773986c9ffd2fd46e3331471ea892
|
||||
SHA1 (patch-ba) = 9832a8c5afecc1f0b0805c78142afa62a31bc24f
|
||||
SHA1 (patch-bb) = 2b5df93c18a2baabed0d2a878242e1fa30647167
|
||||
SHA1 (patch-bc) = ce6240227e8a7af506c908e0c199e17ce73d7f27
|
||||
|
@ -44,7 +44,7 @@ SHA1 (patch-bd) = 01c4490ec36fec09148bcb9c76ba6c8de509c346
|
|||
SHA1 (patch-bf) = 089ac290cbbe5c060e5300ea3ffacf8cb5ab5254
|
||||
SHA1 (patch-bg) = bf979ed89e0d8d29bd411711a69d74cd139d8fa8
|
||||
SHA1 (patch-bh) = f59b14cc43d5977a5d80d5d1ab4e246df394d86a
|
||||
SHA1 (patch-bi) = d97512603b313ee730687e3b5680d45002ade51c
|
||||
SHA1 (patch-bi) = c0e237bd46de0f9ef137997e59231f119d5f791e
|
||||
SHA1 (patch-bj) = 6dba88723ee632b67fcf6a2dd2918e69034837e2
|
||||
SHA1 (patch-bl) = f2cd03713d7cdb6cb41119569031249d7d708b13
|
||||
SHA1 (patch-bm) = 2f00f63120a90477c6f5c63ac6ca23fc508b9e54
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
$NetBSD: patch-az,v 1.1.1.1 2003/04/11 00:31:45 uebayasi Exp $
|
||||
$NetBSD: patch-az,v 1.2 2016/11/26 03:50:16 dholland Exp $
|
||||
|
||||
--- src/unexelf.c.orig Mon May 15 01:14:02 2000
|
||||
+++ src/unexelf.c Tue Sep 26 14:18:05 2000
|
||||
@@ -470,7 +470,7 @@
|
||||
--- src/unexelf.c.orig 2000-05-15 08:14:02.000000000 +0000
|
||||
+++ src/unexelf.c
|
||||
@@ -470,15 +470,18 @@ typedef struct {
|
||||
/*
|
||||
* NetBSD does not have normal-looking user-land ELF support.
|
||||
*/
|
||||
-# ifdef __alpha__
|
||||
+# include <sys/exec_elf.h>
|
||||
+# if !defined(ELFSIZE)
|
||||
+# if defined(__alpha__) || defined(__sparc_v9__)
|
||||
# define ELFSIZE 64
|
||||
# else
|
||||
# define ELFSIZE 32
|
||||
@@ -479,6 +479,7 @@
|
||||
# endif
|
||||
-# include <sys/exec_elf.h>
|
||||
+# endif
|
||||
|
||||
# ifndef PT_LOAD
|
||||
# define PT_LOAD Elf_pt_load
|
||||
|
@ -19,7 +23,7 @@ $NetBSD: patch-az,v 1.1.1.1 2003/04/11 00:31:45 uebayasi Exp $
|
|||
# define SHT_SYMTAB Elf_sht_symtab
|
||||
# define SHT_DYNSYM Elf_sht_dynsym
|
||||
# define SHT_NULL Elf_sht_null
|
||||
@@ -495,9 +496,14 @@
|
||||
@@ -495,9 +498,14 @@ typedef struct {
|
||||
# include <sys/exec_ecoff.h>
|
||||
# define HDRR struct ecoff_symhdr
|
||||
# define pHDRR HDRR *
|
||||
|
@ -35,7 +39,7 @@ $NetBSD: patch-az,v 1.1.1.1 2003/04/11 00:31:45 uebayasi Exp $
|
|||
#ifdef __OpenBSD__
|
||||
# include <sys/exec_elf.h>
|
||||
#endif
|
||||
@@ -512,7 +518,7 @@
|
||||
@@ -512,7 +520,7 @@ typedef struct {
|
||||
# else
|
||||
# define ElfBitsW(bits, type) Elf/**/bits/**/_/**/type
|
||||
# endif
|
||||
|
@ -44,7 +48,7 @@ $NetBSD: patch-az,v 1.1.1.1 2003/04/11 00:31:45 uebayasi Exp $
|
|||
# define ELFSIZE 64
|
||||
# else
|
||||
# define ELFSIZE 32
|
||||
@@ -522,6 +528,14 @@
|
||||
@@ -522,6 +530,14 @@ typedef struct {
|
||||
# define ElfW(type) ElfExpandBitsW (ELFSIZE, type)
|
||||
#endif
|
||||
|
||||
|
@ -59,7 +63,7 @@ $NetBSD: patch-az,v 1.1.1.1 2003/04/11 00:31:45 uebayasi Exp $
|
|||
#ifndef ELF_BSS_SECTION_NAME
|
||||
#define ELF_BSS_SECTION_NAME ".bss"
|
||||
#endif
|
||||
@@ -613,12 +627,53 @@
|
||||
@@ -613,12 +629,53 @@ find_section (name, section_names, file_
|
||||
if (noerror)
|
||||
return -1;
|
||||
else
|
||||
|
@ -114,7 +118,7 @@ $NetBSD: patch-az,v 1.1.1.1 2003/04/11 00:31:45 uebayasi Exp $
|
|||
/* ****************************************************************
|
||||
* unexec
|
||||
*
|
||||
@@ -1005,22 +1060,11 @@
|
||||
@@ -1005,22 +1062,11 @@ unexec (new_name, old_name, data_start,
|
||||
== 0)
|
||||
{
|
||||
pHDRR symhdr = (pHDRR) (NEW_SECTION_H (nn).sh_offset + new_base);
|
||||
|
@ -139,7 +143,7 @@ $NetBSD: patch-az,v 1.1.1.1 2003/04/11 00:31:45 uebayasi Exp $
|
|||
if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG
|
||||
&& old_mdebug_index != -1)
|
||||
{
|
||||
@@ -1030,20 +1074,17 @@
|
||||
@@ -1030,20 +1076,17 @@ unexec (new_name, old_name, data_start,
|
||||
|
||||
if (diff)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
$NetBSD: patch-bi,v 1.1.1.1 2003/04/11 00:31:45 uebayasi Exp $
|
||||
$NetBSD: patch-bi,v 1.2 2016/11/26 03:50:16 dholland Exp $
|
||||
|
||||
--- ./src/gmalloc.c.orig Mon Feb 21 05:21:51 2000
|
||||
+++ ./src/gmalloc.c Tue Sep 26 09:44:47 2000
|
||||
@@ -371,7 +371,7 @@
|
||||
Work around bug in gcc 5.x that makes calloc into a call to itself,
|
||||
resulting in an infinite loop.
|
||||
|
||||
--- src/gmalloc.c.orig 2000-02-21 13:21:51.000000000 +0000
|
||||
+++ src/gmalloc.c
|
||||
@@ -371,7 +371,7 @@ __malloc_size_t _bytes_free;
|
||||
/* Are you experienced? */
|
||||
int __malloc_initialized;
|
||||
|
||||
|
@ -11,3 +14,18 @@ $NetBSD: patch-bi,v 1.1.1.1 2003/04/11 00:31:45 uebayasi Exp $
|
|||
|
||||
void (*__malloc_initialize_hook) PP ((void));
|
||||
void (*__after_morecore_hook) PP ((void));
|
||||
@@ -1420,7 +1420,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);
|
||||
|
|
Loading…
Reference in a new issue