[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: David Michael
Subject: Cross-compiling
Date: Wed, 05 Feb 2020 10:45:00 -0500


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?



[0] /usr/lib/systemd/system/emacs-pdmp.service:
Description=Create a cached portable dump file for faster Emacs startup
ExecStart=/usr/bin/emacs --batch --eval='(dump-emacs-portable 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]