-########## FROM src/Makefile:
-## The dumped Emacs is as functional and more efficient than
-## bootstrap-emacs, so we replace the latter with the former.
-## Strictly speaking, emacs does not depend directly on all of $lisp,
-## since not all pieces are used on all platforms. But DOC depends
-## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here.
-# emacs$(EXEEXT): temacs$(EXEEXT) $(etc)/DOC $(lisp) $(leimdir)/leim-list.el
-# if test "$(CANNOT_DUMP)" = "yes"; then \
-# rm -f emacs$(EXEEXT); \
-# ln temacs$(EXEEXT) emacs$(EXEEXT); \
-# else \
-# LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump || exit 1; \
-# test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \
-# rm -f bootstrap-emacs$(EXEEXT); \
-# ln emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \
-# fi
-
-# so emacs => temacs, and then it tries to execute emacs, leading to error
-
-# We can build without dump, but a bootstrap-emacs is still needed to produce bytecode-compiled (platform-independent) emacs lisp .elc files.
+termux_step_post_extract_package () {
+ # XXX: We have to start with new host build each time
+ # to avoid build error when cross compiling.
+ rm -Rf $TERMUX_PKG_HOSTBUILD_DIR
+}