Files
meta-openembedded/meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch
Gyorgy Sarvari c9a55aef87 emacs: upgrade 29.1 -> 30.2
Added a new patch to avoid unexporting some environment variables that are set
by the recipe explicitly, to avoid the following build error:

| Loading env...
| 'bootstrap-emacs' -batch --no-site-file --no-site-lisp -batch -l ja-dic-cnv \
|   -f batch-skkdic-convert -dir "../../sources/emacs-29.2/leim/../lisp/leim/ja-dic" --no-reduction "../../sources/emacs-29.2/leim/SKK-DIC/SKK-JISYO.L"
<...>
| Error: <RECIP_SYSROOT_NATIVE>/usr/share/emacs/29.2/etc/charsets: No such file or directory

Changelogs:
29.2 - 29.4: https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.29
30.1 - 30.2: https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.30

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-10-06 11:34:38 -07:00

40 lines
1.5 KiB
Diff

Upstream-Status: Inappropriate [OE-Specific]
Emacs introduced a sanity-check for the build artifacts, where it
runs the newly built emacs to perform some checks.
This is not going to work for us since we are cross-compiling,
we need to avoid running target binaries on the host
Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
Index: emacs-29.1/Makefile.in
===================================================================
--- emacs-29.1.orig/Makefile.in
+++ emacs-29.1/Makefile.in
@@ -420,19 +420,11 @@
@exit ${exit-status}
sanity-check:
- @[ -f .no-advice-on-failure ] && exit 0; true
- @v=`src/emacs${EXEEXT} --batch -Q --eval \
- '(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 10)))' \
- 2> /dev/null`; \
- [ "X$$v" = "X3628800" ] && exit 0; \
- echo >&2 '***'; \
- echo >&2 '*** '"\"make ${make-target}\" succeeded, but Emacs is not functional."; \
- echo >&2 '***'; \
- cat Makefile | \
- sed -n '/^# ADVICE-ON-FAILURE-BEGIN:${make-target}/,$${p;/^# ADVICE-ON-FAILURE-END:${make-target}/q;};' | \
- sed 's/^# /*** /' | grep -v '^\*\*\* ADVICE-ON-FAILURE-' >&2; \
- echo >&2 '***'; \
- exit 1
+# The Makefile will try to call the newly built emacs to perform some checks
+# this is not going to work since it was (probably) built for a different architecture.
+# Avoid calling target binaries from the host and simply assume our build artifacts work.
+ exit 0
+
.PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 epaths-force-ns-self-contained etc-emacsver