all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Michael <fedora.dm0@gmail.com>
To: emacs-devel@gnu.org
Subject: Cross-compiling
Date: Wed, 05 Feb 2020 10:45:00 -0500	[thread overview]
Message-ID: <87r1z9hwcj.fsf@gmail.com> (raw)

Hi,

I briefly looked into cross-compiling Emacs, and it seems more feasible
with pdumper now.  I'm writing to ask if anyone sees an issue with this
process and if it is reasonable to submit patches for any of it.

My process for testing is:
 1. Configure the source with a native compiler
 2. Make the "lisp" and "blessmail" targets
 3. Save make-{docfile,fingerprint} and run "make clean"
 4. Configure the source for cross-compiling with:
        --with-dumping=none --with-pdumper
 5. Make the "lib" directory
 6. Restore and touch the native make-{docfile,fingerprint}
 7. Make and install everything normally
 8. Symlink the dump file path to /var/cache/emacs/emacs.pdmp
 9. Install a service to create a cached dump file on boot[0]

I've built a full graphical GTK+ 3 Emacs on a 64-bit little-endian
system for a 32-bit big-endian system with this, and it seems to work
with no problems.

For an upstreamable implementation, I was thinking of these changes:
 1. Use the BUILD_CC paradigm to compile make-{docfile,fingerprint}
    natively since these are only for build-time and not installed.
    This would have to produce a native libgnu.a version as well.
 2. Allow a default search path for dump files, so it can check for a
    packaged file in /usr, but also try /var for locally generated dump
    files (which could be useful outside cross-compilation, e.g. to save
    a custom default dump file when /usr is immutable).
 3. Maybe carry a service to create a dump file on boot.  This is
    trivial enough that it could be left to the user.
 4. Handle byte-compiling.  Produce a minimal native Emacs binary to be
    executed on the build system.

Does anyone familiar with the build process see problems with this?  Is
it something that would be acceptable upstream?

Thanks.

David

[0] /usr/lib/systemd/system/emacs-pdmp.service:
[Unit]
Description=Create a cached portable dump file for faster Emacs startup
ConditionPathExists=!/var/cache/emacs/emacs.pdmp
[Service]
CacheDirectory=emacs
ExecStart=/usr/bin/emacs --batch --eval='(dump-emacs-portable "/var/cache/emacs/emacs.pdmp")'
Type=oneshot
[Install]
WantedBy=multi-user.target



             reply	other threads:[~2020-02-05 15:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 15:45 David Michael [this message]
2020-02-05 21:13 ` Cross-compiling Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1z9hwcj.fsf@gmail.com \
    --to=fedora.dm0@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.