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: James Luke
Subject: Re: Make cross-compiling temacs easier: drop gnulib for build intermediates, or use recursive autoconf?
Date: Sat, 26 Jun 2021 15:56:56 -0700

On Fri, 25 Jun 2021 at 23:26, Eli Zaretskii <eliz@gnu.org> wrote:
> 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?

Yes, that was the notion.

>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.

I think you've outed me as a dunderhead. :-)
I was under the mistaken impression that libgccjit was standalone and
did not rely on the system's gcc. This revelation scuttles my main
reason for pursuing the idea, which was to limit the need to set up a
build system (compiler, make, etc) on the host. As such, I don't plan
on pursuing the idea further.

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

No system that actually *required* cross-compilation. The idea was to
make reproducible builds easier, and provide a convenience for testing
and distribution. My initial interest was catching problems on Windows
and making it easier to do regular development snapshots.

> 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.

I took an (admittedly brief) look at make-docfile.c, and I'm pretty
sure it's possible rewrite it so that it only requires a few functions
from stdio. I suspect platform-specific #ifdefs would have been quite
small and maintainable. Of course, it's possible I underestimated the
number of functions required, the number of #ifdefs required, or just
how sneaky the portability issues could be.

It turned out that make-fingerprint was more of a challenge. It is
possible to replace it with a small shell script that uses the the
"base32" and "sha256" commands, but I discovered those are not
available on all build platforms emacs supports. (The meat of the
script would have been along the lines of `cat temacs | base32 | sed
's/<placeholder fingerprint>/<fingerprint>/' | base32 -d >
temacs-fingerprinted`. Which is slightly silly, but surprisingly
efficient.)

Even if I hadn't been mistaken about libgccjit, the make-fingerprint
problem would have likely toppled the idea of a "portable rewrite" and
I would have gone the recursive configure route.

Thanks for the input. :-)



reply via email to

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