* 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
* Re: Cross-compiling
2020-02-05 15:45 Cross-compiling David Michael
@ 2020-02-05 21:13 ` Paul Eggert
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2020-02-05 21:13 UTC (permalink / raw)
To: David Michael; +Cc: emacs-devel
On 2/5/20 7:45 AM, David Michael wrote:
> Does anyone familiar with the build process see problems with this? Is
> it something that would be acceptable upstream?
Something along those lines should be acceptable, I'd think.
I assume you're building from a tarball, and not from Git. If you are
building from Git, then the first step should be to build a tarball
natively, and then start from the tarball. This should simply any
cross-build support we need to add.
make-docfile shouldn't be needed native, as we can distribute its output
as part of the tarball.
For blessmail, we can convert it to a shell script on platforms that
have a shell (which should be the only platforms where cross-building is
an issue.) Blessmail is obsolete anyway - perhaps we should start
installing blessmail only on explicit request - but I digress.
For make-fingerprint, it's not that important and we could make its use
optional. Or we could write a shell script a la blessmail. Or we could
convert it from C to Elisp and integrate it as part of the build
process. Either way, we wouldn't need to build it on the build host.
If we do the above, we wouldn't need to worry so much about native vs
cross-builds.
^ 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.