emacs-devel
[Top][All Lists]
Advanced

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

Re: Make cross-compiling temacs easier: drop gnulib for build intermedia


From: Eli Zaretskii
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

> 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 via email to

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