diff options
Diffstat (limited to 'meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch')
-rw-r--r-- | meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch | 38 |
1 files changed, 38 insertions, 0 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 @@ | |||
1 | Upstream-Status: Inappropriate [OE-Specific] | ||
2 | |||
3 | Emacs introduced a sanity-check for the build artifacts, where it | ||
4 | runs the newly built emacs to perform some checks. | ||
5 | |||
6 | This is not going to work for us since we are cross-compiling, | ||
7 | we need to avoid running target binaries on the host | ||
8 | |||
9 | Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org> | ||
10 | |||
11 | Index: 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 | |||