Files
meta-openembedded/meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch
Alejandro Hernandez Samaniego 1cfd2bcc84 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>
2023-08-30 00:20:59 -07:00

39 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
@@ -416,19 +416,10 @@ advice-on-failure:
@exit ${exit-status}
sanity-check:
- @[ -f .no-advice-on-failure ] && exit 0; true
- @v=$$(src/emacs${EXEEXT} --batch --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