summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/emacs/files
diff options
context:
space:
mode:
authorAlejandro Hernandez Samaniego <alejandro@enedino.org>2023-08-30 00:25:17 -0600
committerKhem Raj <raj.khem@gmail.com>2023-08-30 00:20:59 -0700
commit1cfd2bcc847526af3f476adab0703b20d6184104 (patch)
treea5289a6cad3c702ddfffc0d91bb9fe8063605e30 /meta-oe/recipes-support/emacs/files
parentf9afd633705c46033a9e7539af4ad7423890ac7c (diff)
downloadmeta-openembedded-1cfd2bcc847526af3f476adab0703b20d6184104.tar.gz
emacs: update to 29.1
- Rebase (and rename) use-emacs-native-tools-for-cross-compiling.patch - Build bootstrap-emacs for emacs-native - Use bootstrap-emacs (native) for cross compiling. - We need to pass EMACSLOADPATH and EMACSDATA so we can control the directories being used by bootstrap-emacs. - Create avoid-running-host-binaries-for-sanity.patch to avoid running the newly integrated santity-check by emacs since it tries to run target binaries on the host. - Fix emacs-minimal packaging for new version. Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/emacs/files')
-rw-r--r--meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch38
-rw-r--r--meta-oe/recipes-support/emacs/files/use-emacs-native-tools-for-cross-compiling.patch106
-rw-r--r--meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch85
3 files changed, 144 insertions, 85 deletions
diff --git a/meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch b/meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch
new file mode 100644
index 0000000000..719ee4bce9
--- /dev/null
+++ b/meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Inappropriate [OE-Specific]
2
3Emacs introduced a sanity-check for the build artifacts, where it
4runs the newly built emacs to perform some checks.
5
6This is not going to work for us since we are cross-compiling,
7we need to avoid running target binaries on the host
8
9Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
10
11Index: emacs-29.1/Makefile.in
12===================================================================
13--- emacs-29.1.orig/Makefile.in
14+++ emacs-29.1/Makefile.in
15@@ -416,19 +416,10 @@ advice-on-failure:
16 @exit ${exit-status}
17
18 sanity-check:
19- @[ -f .no-advice-on-failure ] && exit 0; true
20- @v=$$(src/emacs${EXEEXT} --batch --eval \
21- '(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 10)))' \
22- 2> /dev/null); \
23- [ "X$$v" = "X3628800" ] && exit 0; \
24- echo >&2 '***'; \
25- echo >&2 '*** '"\"make ${make-target}\" succeeded, but Emacs is not functional."; \
26- echo >&2 '***'; \
27- cat Makefile | \
28- sed -n '/^# ADVICE-ON-FAILURE-BEGIN:${make-target}/,$${p;/^# ADVICE-ON-FAILURE-END:${make-target}/q;};' | \
29- sed 's/^# /*** /' | grep -v '^\*\*\* ADVICE-ON-FAILURE-' >&2; \
30- echo >&2 '***'; \
31- exit 1
32+# The Makefile will try to call the newly built emacs to perform some checks
33+# this is not going to work since it was (probably) built for a different architecture.
34+# Avoid calling target binaries from the host and simply assume our build artifacts work.
35+ exit 0
36
37 .PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 epaths-force-ns-self-contained etc-emacsver
38
diff --git a/meta-oe/recipes-support/emacs/files/use-emacs-native-tools-for-cross-compiling.patch b/meta-oe/recipes-support/emacs/files/use-emacs-native-tools-for-cross-compiling.patch
new file mode 100644
index 0000000000..df5e4bd258
--- /dev/null
+++ b/meta-oe/recipes-support/emacs/files/use-emacs-native-tools-for-cross-compiling.patch
@@ -0,0 +1,106 @@
1Upstream-Status: Inappropriate [OE-Specific]
2
3When building emacs, it builds some tools for the HOST
4that are then used to build for target, such as
5make-fingerprint and make-docfile and bootstrap-emacs,
6this needs to be adapted to be used by bitbake, otherwise
7the compiled executables arent compatible with the HOST.
8
9We also need to be able to use emacs env variables to
10control how bootstrap-emacs is used when cross-compiling.
11
12Use the above mentioned tools provided by the native
13version of the recipe instead.
14
15Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
16
17Index: emacs-29.1/src/Makefile.in
18===================================================================
19--- emacs-29.1.orig/src/Makefile.in
20+++ emacs-29.1/src/Makefile.in
21@@ -1,3 +1,4 @@
22+
23 ### @configure_input@
24
25 # Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2023 Free Software
26@@ -508,7 +509,7 @@ ifeq ($(CHECK_STRUCTS),true)
27 pdumper.o: dmpstruct.h
28 endif
29 dmpstruct.h: $(srcdir)/dmpstruct.awk
30-dmpstruct.h: $(libsrc)/make-fingerprint$(EXEEXT) $(dmpstruct_headers)
31+dmpstruct.h: $(dmpstruct_headers)
32 $(AM_V_GEN)POSIXLY_CORRECT=1 awk -f $(srcdir)/dmpstruct.awk \
33 $(dmpstruct_headers) > $@
34
35@@ -610,8 +611,7 @@ SYSTEM_TYPE = @SYSTEM_TYPE@
36 ## Strictly speaking, emacs does not depend directly on all of $lisp,
37 ## since not all pieces are used on all platforms. But DOC depends
38 ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here.
39-emacs$(EXEEXT): temacs$(EXEEXT) \
40- lisp.mk $(etc)/DOC $(lisp) \
41+emacs$(EXEEXT): lisp.mk $(etc)/DOC $(lisp) \
42 $(lispsource)/international/charprop.el ${charsets}
43 ifeq ($(SYSTEM_TYPE),cygwin)
44 find ${top_builddir} -name '*.eln' | rebase -v -O -T -
45@@ -654,7 +654,7 @@ endif
46 $(etc)/DOC: $(libsrc)/make-docfile$(EXEEXT) $(doc_obj)
47 $(AM_V_GEN)$(MKDIR_P) $(etc)
48 $(AM_V_at)rm -f $(etc)/DOC
49- $(AM_V_at)$(libsrc)/make-docfile -d $(srcdir) \
50+ make-docfile -d $(srcdir) \
51 $(SOME_MACHINE_OBJECTS) $(doc_obj) > $(etc)/DOC
52
53 $(libsrc)/make-docfile$(EXEEXT) $(libsrc)/make-fingerprint$(EXEEXT): \
54@@ -671,7 +671,7 @@ buildobj.h: Makefile
55 GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m)
56
57 gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES)
58- $(AM_V_GLOBALS)$(libsrc)/make-docfile -d $(srcdir) -g $(doc_obj) > globals.tmp
59+ make-docfile -d $(srcdir) -g $(doc_obj) > globals.tmp
60 $(AM_V_at)$(top_srcdir)/build-aux/move-if-change globals.tmp globals.h
61 $(AM_V_at)echo timestamp > $@
62
63@@ -685,7 +685,7 @@ $(LIBEGNU_ARCHIVE): $(config_h)
64 $(MAKE) -C $(dir $@) all
65
66 ifeq ($(HAVE_PDUMPER),yes)
67-MAKE_PDUMPER_FINGERPRINT = $(libsrc)/make-fingerprint$(EXEEXT)
68+MAKE_PDUMPER_FINGERPRINT = make-fingerprint
69 else
70 MAKE_PDUMPER_FINGERPRINT =
71 endif
72Index: emacs-29.1/lisp/Makefile.in
73===================================================================
74--- emacs-29.1.orig/lisp/Makefile.in
75+++ emacs-29.1/lisp/Makefile.in
76@@ -53,7 +53,7 @@ FIND_DELETE = @FIND_DELETE@
77 # We never change directory before running Emacs, so a relative file
78 # name is fine, and makes life easier. If we need to change
79 # directory, we can use emacs --chdir.
80-EMACS = ../src/emacs${EXEEXT}
81+EMACS = bootstrap-emacs
82
83 # Command line flags for Emacs.
84
85@@ -109,7 +109,7 @@ MAIN_FIRST = ./emacs-lisp/eieio.el ./ema
86 ./org/oc.el ./org/ol.el ./emacs-lisp/cl-lib.el
87
88 # Prevent any settings in the user environment causing problems.
89-unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH
90+unexport EMACSDOC EMACSPATH
91
92 # The actual Emacs command run in the targets below.
93 emacs = '$(EMACS)' $(EMACSOPT)
94Index: emacs-29.1/Makefile.in
95===================================================================
96--- emacs-29.1.orig/Makefile.in
97+++ emacs-29.1/Makefile.in
98@@ -328,7 +328,7 @@ GLIB_COMPILE_SCHEMAS = glib-compile-sche
99 TRANSFORM = @program_transform_name@
100
101 # Prevent any settings in the user environment causing problems.
102-unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH
103+unexport EMACSDOC EMACSPATH
104
105 # What emacs should be called when installed.
106 EMACS_NAME = `echo emacs | sed '$(TRANSFORM)'`
diff --git a/meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch b/meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch
deleted file mode 100644
index 95b4281836..0000000000
--- a/meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch
+++ /dev/null
@@ -1,85 +0,0 @@
1Upstream-Status: Inappropriate [OE-Specific]
2
3When building emacs, it builds some tools for the HOST
4that are then used to build for target, such as
5make-fingerprint and make-docfile, this needs to be
6adapted to be used by bitbake, otherwise the compiled
7executables arent compatible with the HOST.
8
9Use the above mentioned tools provided by the native
10version of the recipe instead.
11
12Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
13
14Index: emacs-28.2/src/Makefile.in
15===================================================================
16--- emacs-28.2.orig/src/Makefile.in
17+++ emacs-28.2/src/Makefile.in
18@@ -462,7 +462,7 @@ ifeq ($(CHECK_STRUCTS),true)
19 pdumper.o: dmpstruct.h
20 endif
21 dmpstruct.h: $(srcdir)/dmpstruct.awk
22-dmpstruct.h: $(libsrc)/make-fingerprint$(EXEEXT) $(dmpstruct_headers)
23+dmpstruct.h: $(dmpstruct_headers)
24 $(AM_V_GEN)POSIXLY_CORRECT=1 awk -f $(srcdir)/dmpstruct.awk \
25 $(dmpstruct_headers) > $@
26
27@@ -563,8 +563,7 @@ SYSTEM_TYPE = @SYSTEM_TYPE@
28 ## Strictly speaking, emacs does not depend directly on all of $lisp,
29 ## since not all pieces are used on all platforms. But DOC depends
30 ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here.
31-emacs$(EXEEXT): temacs$(EXEEXT) \
32- lisp.mk $(etc)/DOC $(lisp) \
33+emacs$(EXEEXT): lisp.mk $(etc)/DOC $(lisp) \
34 $(lispsource)/international/charprop.el ${charsets}
35 ifeq ($(SYSTEM_TYPE),cygwin)
36 find ${top_builddir} -name '*.eln' | rebase -v -O -T -
37@@ -597,15 +596,15 @@ endif
38 ## for the first time, this prevents any variation between configurations
39 ## in the contents of the DOC file.
40 ##
41-$(etc)/DOC: lisp.mk $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp)
42+$(etc)/DOC: lisp.mk $(obj) $(lisp)
43 $(AM_V_GEN)$(MKDIR_P) $(etc)
44 $(AM_V_at)rm -f $(etc)/DOC
45- $(AM_V_at)$(libsrc)/make-docfile -d $(srcdir) \
46+ make-docfile -d $(srcdir) \
47 $(SOME_MACHINE_OBJECTS) $(obj) > $(etc)/DOC
48- $(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \
49+ make-docfile -a $(etc)/DOC -d $(lispsource) \
50 $(shortlisp)
51
52-$(libsrc)/make-docfile$(EXEEXT) $(libsrc)/make-fingerprint$(EXEEXT): \
53+$(libsrc)/make-fingerprint$(EXEEXT): \
54 $(lib)/libgnu.a
55 $(MAKE) -C $(dir $@) $(notdir $@)
56
57@@ -618,8 +617,8 @@ buildobj.h: Makefile
58
59 GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m)
60
61-gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES)
62- $(AM_V_GLOBALS)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) > globals.tmp
63+gl-stamp: $(GLOBAL_SOURCES)
64+ make-docfile -d $(srcdir) -g $(obj) > globals.tmp
65 $(AM_V_at)$(top_srcdir)/build-aux/move-if-change globals.tmp globals.h
66 $(AM_V_at)echo timestamp > $@
67
68@@ -633,7 +632,7 @@ $(LIBEGNU_ARCHIVE): $(config_h)
69 $(MAKE) -C $(dir $@) all
70
71 ifeq ($(HAVE_PDUMPER),yes)
72- MAKE_PDUMPER_FINGERPRINT = $(libsrc)/make-fingerprint$(EXEEXT)
73+ MAKE_PDUMPER_FINGERPRINT = make-fingerprint
74 else
75 MAKE_PDUMPER_FINGERPRINT =
76 endif
77@@ -643,7 +642,7 @@ endif
78 ## This goes on to affect various things, and the emacs binary fails
79 ## to start if Vinstallation_directory has the wrong value.
80 temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \
81- $(charsets) $(charscript) ${emoji-zwj} $(MAKE_PDUMPER_FINGERPRINT)
82+ $(charsets) $(charscript) ${emoji-zwj}
83 $(AM_V_CCLD)$(CC) -o $@.tmp \
84 $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
85 $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES)