all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Cross-compiling
@ 2020-02-05 15:45 David Michael
  2020-02-05 21:13 ` Cross-compiling Paul Eggert
  0 siblings, 1 reply; 2+ messages in thread
From: David Michael @ 2020-02-05 15:45 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-05 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-05 15:45 Cross-compiling David Michael
2020-02-05 21:13 ` Cross-compiling Paul Eggert

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.