Accepting request 420469 from editors
- Use standard filew permissions for ghost entries - Use %ext_man as manual page extensions - Fix yaosdd report (boo#994285) - emacs-24.4-glibc.patch: don't force system malloc, it doesn't work with glibc 2.24 - gmalloc.patch: fix portability bugs in gmalloc OBS-URL: https://build.opensuse.org/request/show/420469 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/emacs?expand=0&rev=124
This commit is contained in:
commit
7f2ea357dc
@ -4,17 +4,23 @@
|
||||
lib-src/Makefile.in | 6 ++++--
|
||||
3 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
--- configure.ac
|
||||
+++ configure.ac 2014-10-21 13:50:36.287837811 +0000
|
||||
@@ -1988,6 +1988,7 @@ system_malloc=$emacs_cv_sanitize_address
|
||||
Index: configure
|
||||
===================================================================
|
||||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -10951,6 +10951,7 @@ fi
|
||||
use_mmap_for_buffers=no
|
||||
case "$opsys" in
|
||||
## darwin ld insists on the use of malloc routines in the System framework.
|
||||
darwin|sol2-10) system_malloc=yes ;;
|
||||
+ gnu-linux) system_malloc=yes ;;
|
||||
cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
|
||||
+ gnu-linux) use_mmap_for_buffers=yes ;;
|
||||
esac
|
||||
|
||||
GMALLOC_OBJ=
|
||||
@@ -2045,6 +2046,7 @@ fi
|
||||
|
||||
Index: configure.ac
|
||||
===================================================================
|
||||
--- configure.ac.orig
|
||||
+++ configure.ac
|
||||
@@ -2048,6 +2048,7 @@ fi
|
||||
use_mmap_for_buffers=no
|
||||
case "$opsys" in
|
||||
cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
|
||||
@ -22,21 +28,3 @@
|
||||
esac
|
||||
|
||||
AC_FUNC_MMAP
|
||||
--- configure
|
||||
+++ configure 2014-10-21 13:51:36.143837910 +0000
|
||||
@@ -10862,6 +10862,7 @@ system_malloc=$emacs_cv_sanitize_address
|
||||
case "$opsys" in
|
||||
## darwin ld insists on the use of malloc routines in the System framework.
|
||||
darwin|sol2-10) system_malloc=yes ;;
|
||||
+ gnu-linux) system_malloc=yes ;;
|
||||
esac
|
||||
|
||||
GMALLOC_OBJ=
|
||||
@@ -10949,6 +10950,7 @@ fi
|
||||
use_mmap_for_buffers=no
|
||||
case "$opsys" in
|
||||
cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
|
||||
+ gnu-linux) use_mmap_for_buffers=yes ;;
|
||||
esac
|
||||
|
||||
|
||||
|
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 19 08:58:26 UTC 2016 - werner@suse.de
|
||||
|
||||
- Use standard filew permissions for ghost entries
|
||||
- Use %ext_man as manual page extensions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 18 09:30:13 UTC 2016 - werner@suse.de
|
||||
|
||||
- Fix yaosdd report (boo#994285)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 10 15:10:01 UTC 2016 - schwab@suse.de
|
||||
|
||||
- emacs-24.4-glibc.patch: don't force system malloc, it doesn't work with
|
||||
glibc 2.24
|
||||
- gmalloc.patch: fix portability bugs in gmalloc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 10 12:07:49 UTC 2016 - werner@suse.de
|
||||
|
||||
|
26
emacs.spec
26
emacs.spec
@ -126,6 +126,7 @@ Patch36: emacs-24-0016-ELF-unexec-Drive-from-PT_LOAD-header-rather-than-s
|
||||
Patch37: emacs-24-0017-ELF-unexec-Don-t-insert-a-new-section.patch
|
||||
Patch38: emacs-24-0018-src-unexelf.c-NEW_PROGRAM_H-Remove-unused-macro-Bug-.patch
|
||||
Patch39: emacs-24-0019-ELF-unexec-align-section-header.patch
|
||||
Patch40: gmalloc.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{expand: %%global include_info %(test -s /usr/share/info/info.info* && echo 0 || echo 1)}
|
||||
@ -252,6 +253,7 @@ and most assembler-like syntaxes.
|
||||
%patch37 -p1
|
||||
%patch38 -p1
|
||||
%patch39 -p1
|
||||
%patch40 -p1
|
||||
|
||||
%if %{without autoconf}
|
||||
# We don't want to run autoconf
|
||||
@ -594,7 +596,11 @@ rm -vf %{buildroot}%{_datadir}/emacs/%{version}/etc/emacs.desktop
|
||||
cp etc/images/icons/hicolor/32x32/apps/emacs.png $RPM_SOURCE_DIR/emacs.png
|
||||
%suse_update_desktop_file -r -i emacs TextEditor Utility
|
||||
%if 0%{suse_version} >= 1300
|
||||
touch %{buildroot}%{_bindir}/ctags %{buildroot}%{_mandir}/man1/ctags.1.gz
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
ln -sf %{_sysconfdir}/alternatives/ctags %{buildroot}%{_bindir}/ctags
|
||||
ln -sf %{_sysconfdir}/alternatives/ctags.1%{ext_man} %{buildroot}%{_mandir}/man1/ctags.1%{ext_man}
|
||||
ln -sf %{_bindir}/gnuctags %{buildroot}%{_sysconfdir}/alternatives/ctags
|
||||
ln -sf %{_mandir}/man1/gnuctags.1%{ext_man} %{buildroot}%{_sysconfdir}/alternatives/ctags.1%{ext_man}
|
||||
%else
|
||||
rm -vf %{buildroot}%{_bindir}/etags
|
||||
rm -vf %{buildroot}%{_bindir}/gnuctags
|
||||
@ -642,8 +648,8 @@ done
|
||||
%post -n etags
|
||||
test -L %{_bindir}/ctags || rm -f %{_bindir}/ctags
|
||||
%{_sbindir}/update-alternatives --quiet --force --install \
|
||||
%{_bindir}/ctags ctags %{_bindir}/gnuctags 10 \
|
||||
--slave %{_mandir}/man1/ctags.1.gz ctags.1 %{_mandir}/man1/gnuctags.1.gz
|
||||
%{_bindir}/ctags ctags %{_bindir}/gnuctags 10 \
|
||||
--slave %{_mandir}/man1/ctags.1%{ext_man} ctags.1 %{_mandir}/man1/gnuctags.1%{ext_man}
|
||||
%{_sbindir}/update-alternatives --auto ctags
|
||||
|
||||
%preun -n etags
|
||||
@ -3158,8 +3164,8 @@ fi
|
||||
%{_datadir}/emacs/site-lisp/subdirs.el
|
||||
%{_datadir}/emacs/site-lisp/vt200-esc-fix.elc
|
||||
%{_datadir}/emacs/site-lisp/xfonts.elc
|
||||
%{_mandir}/man1/*.1.gz
|
||||
%exclude %{_mandir}/man1/*tags.1.gz
|
||||
%{_mandir}/man1/*.1%{ext_man}
|
||||
%exclude %{_mandir}/man1/*tags.1%{ext_man}
|
||||
%dir %{_localstatedir}/games/emacs/
|
||||
%{_localstatedir}/games/emacs/snake-scores
|
||||
%{_localstatedir}/games/emacs/tetris-scores
|
||||
@ -4630,10 +4636,12 @@ fi
|
||||
%doc etc/ETAGS.README
|
||||
%{_bindir}/etags
|
||||
%{_bindir}/gnuctags
|
||||
%{_mandir}/man1/etags.1.gz
|
||||
%{_mandir}/man1/gnuctags.1.gz
|
||||
%ghost %attr(755,root,root) %{_bindir}/ctags
|
||||
%ghost %{_mandir}/man1/ctags.1.gz
|
||||
%{_mandir}/man1/etags.1%{ext_man}
|
||||
%{_mandir}/man1/gnuctags.1%{ext_man}
|
||||
%ghost %{_bindir}/ctags
|
||||
%ghost %{_sysconfdir}/alternatives/ctags
|
||||
%ghost %{_mandir}/man1/ctags.1%{ext_man}
|
||||
%ghost %{_sysconfdir}/alternatives/ctags.1%{ext_man}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
113
gmalloc.patch
Normal file
113
gmalloc.patch
Normal file
@ -0,0 +1,113 @@
|
||||
Index: emacs-24.5/src/emacs.c
|
||||
===================================================================
|
||||
--- emacs-24.5.orig/src/emacs.c
|
||||
+++ emacs-24.5/src/emacs.c
|
||||
@@ -723,6 +723,26 @@ main (int argc, char **argv)
|
||||
stack_base = &dummy;
|
||||
#endif
|
||||
|
||||
+#if defined HAVE_PERSONALITY_LINUX32 && defined __PPC64__
|
||||
+ /* This code partly duplicates the HAVE_PERSONALITY_LINUX32 code
|
||||
+ below. This duplication is planned to be fixed in a later
|
||||
+ Emacs release. */
|
||||
+# define ADD_NO_RANDOMIZE 0x0040000
|
||||
+ int pers = personality (0xffffffff);
|
||||
+ if (! (pers & ADD_NO_RANDOMIZE)
|
||||
+ && 0 <= personality (pers | ADD_NO_RANDOMIZE))
|
||||
+ {
|
||||
+ /* Address randomization was enabled, but is now disabled.
|
||||
+ Re-execute Emacs to get a clean slate. */
|
||||
+ execvp (argv[0], argv);
|
||||
+
|
||||
+ /* If the exec fails, warn the user and then try without a
|
||||
+ clean slate. */
|
||||
+ perror (argv[0]);
|
||||
+ }
|
||||
+# undef ADD_NO_RANDOMIZE
|
||||
+#endif
|
||||
+
|
||||
#ifdef G_SLICE_ALWAYS_MALLOC
|
||||
/* This is used by the Cygwin build. It's not needed starting with
|
||||
cygwin-1.7.24, but it doesn't do any harm. */
|
||||
@@ -833,7 +853,7 @@ main (int argc, char **argv)
|
||||
dumping = !initialized && (strcmp (argv[argc - 1], "dump") == 0
|
||||
|| strcmp (argv[argc - 1], "bootstrap") == 0);
|
||||
|
||||
-#ifdef HAVE_PERSONALITY_LINUX32
|
||||
+#if defined HAVE_PERSONALITY_LINUX32 && !defined __PPC64__
|
||||
if (dumping && ! getenv ("EMACS_HEAP_EXEC"))
|
||||
{
|
||||
/* Set this so we only do this once. */
|
||||
@@ -850,7 +870,7 @@ main (int argc, char **argv)
|
||||
/* If the exec fails, try to dump anyway. */
|
||||
emacs_perror (argv[0]);
|
||||
}
|
||||
-#endif /* HAVE_PERSONALITY_LINUX32 */
|
||||
+#endif
|
||||
|
||||
#if defined (HAVE_SETRLIMIT) && defined (RLIMIT_STACK)
|
||||
/* Extend the stack space available.
|
||||
Index: emacs-24.5/src/gmalloc.c
|
||||
===================================================================
|
||||
--- emacs-24.5.orig/src/gmalloc.c
|
||||
+++ emacs-24.5/src/gmalloc.c
|
||||
@@ -42,6 +42,16 @@ License along with this library. If not
|
||||
extern void emacs_abort (void);
|
||||
#endif
|
||||
|
||||
+#undef malloc
|
||||
+#undef realloc
|
||||
+#undef calloc
|
||||
+#undef free
|
||||
+#define malloc gmalloc
|
||||
+#define realloc grealloc
|
||||
+#define calloc gcalloc
|
||||
+#define aligned_alloc galigned_alloc
|
||||
+#define free gfree
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
@@ -1747,6 +1757,42 @@ valloc (size_t size)
|
||||
return aligned_alloc (pagesize, size);
|
||||
}
|
||||
|
||||
+#undef malloc
|
||||
+#undef realloc
|
||||
+#undef calloc
|
||||
+#undef aligned_alloc
|
||||
+#undef free
|
||||
+
|
||||
+void *
|
||||
+malloc (size_t size)
|
||||
+{
|
||||
+ return gmalloc (size);
|
||||
+}
|
||||
+
|
||||
+void *
|
||||
+calloc (size_t nmemb, size_t size)
|
||||
+{
|
||||
+ return gcalloc (nmemb, size);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+free (void *ptr)
|
||||
+{
|
||||
+ gfree (ptr);
|
||||
+}
|
||||
+
|
||||
+void *
|
||||
+aligned_alloc (size_t alignment, size_t size)
|
||||
+{
|
||||
+ return galigned_alloc (alignment, size);
|
||||
+}
|
||||
+
|
||||
+void *
|
||||
+realloc (void *ptr, size_t size)
|
||||
+{
|
||||
+ return grealloc (ptr, size);
|
||||
+}
|
||||
+
|
||||
#ifdef GC_MCHECK
|
||||
|
||||
/* Standard debugging hooks for `malloc'.
|
Loading…
x
Reference in New Issue
Block a user