diff options
Diffstat (limited to 'meta-oe/recipes-support/emacs/files/use-emacs-native-tools-for-cross-compiling.patch')
| -rw-r--r-- | meta-oe/recipes-support/emacs/files/use-emacs-native-tools-for-cross-compiling.patch | 106 |
1 files changed, 106 insertions, 0 deletions
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 @@ | |||
| 1 | Upstream-Status: Inappropriate [OE-Specific] | ||
| 2 | |||
| 3 | When building emacs, it builds some tools for the HOST | ||
| 4 | that are then used to build for target, such as | ||
| 5 | make-fingerprint and make-docfile and bootstrap-emacs, | ||
| 6 | this needs to be adapted to be used by bitbake, otherwise | ||
| 7 | the compiled executables arent compatible with the HOST. | ||
| 8 | |||
| 9 | We also need to be able to use emacs env variables to | ||
| 10 | control how bootstrap-emacs is used when cross-compiling. | ||
| 11 | |||
| 12 | Use the above mentioned tools provided by the native | ||
| 13 | version of the recipe instead. | ||
| 14 | |||
| 15 | Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> | ||
| 16 | |||
| 17 | Index: 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 | ||
| 72 | Index: 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) | ||
| 94 | Index: 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)'` | ||
