unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: James Luke <james92856@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Make cross-compiling temacs easier: drop gnulib for build intermediates, or use recursive autoconf?
Date: Sat, 26 Jun 2021 09:26:22 +0300	[thread overview]
Message-ID: <83r1gpqgz5.fsf@gnu.org> (raw)
In-Reply-To: <CAFOX7SizgGTBJdakSnLcttkgUgGO0MeWdx01PghoX8oYWfBZsA@mail.gmail.com> (message from James Luke on Fri, 25 Jun 2021 19:22:10 -0700)

> From: James Luke <james92856@gmail.com>
> Date: Fri, 25 Jun 2021 19:22:10 -0700
> 
> I'm interested in making cross-compilation of emacs easier. Or rather, making cross-compilation of temacs
> easier, such that one can run temacs on the host machine to finish the build. This would make it easier to
> create reproducible builds (particularly with Guix/NixOS as the build machine), and means one doesn't need
> a C compiler on the host. Right now the problem I'm running into is caused by build intermediates that must
> be built then run on the builder: the programs "lib-src/make-docfile.c" and "lib-src/make-fingerprint.c".

Please tell more about the idea.  Is the intent to run part of the
build on the "build" system, producing temacs, and then continue on
the "host(=target)" system by running the built temacs there?  If so,
I don't understand the "doesn't need a C compiler on the host" part,
given that we now have native-compilation in Emacs.

Also, which system(s) would you like to target that require
cross-compilation?

> These intermediates both use gnulib (with #include <config.h> etc), but configure.ac only configures gnulib
> for the host machine. So the headers, #defines, and library are all wrong for the build machine and
> compilation fails. To fix this, I'd like to rewrite make-fingerprint.c and make-docfile.c to avoid non-portable
> constructs and thus the dependency on gnulib

I don't think this is a good idea: it's a lot of work, and basically
you will end up with the same portability shims, just incorporated
into the sources.

Why not modify the build process such that it configures Gnulib twice:
once for the build system and another one for the host/target system?
We already compile Gnulib twice in the unexec configuration (which
will probably be removed in the future version, but we still have it
meanwhile).  Building Gnulib twice doesn't sound like such a bad
situation, especially given that we already do so in some cases.



  reply	other threads:[~2021-06-26  6:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-26  2:22 Make cross-compiling temacs easier: drop gnulib for build intermediates, or use recursive autoconf? James Luke
2021-06-26  6:26 ` Eli Zaretskii [this message]
2021-06-26 22:56   ` James Luke
2021-06-27  6:08     ` Eli Zaretskii
2021-06-26 13:56 ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83r1gpqgz5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=james92856@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).