unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: James Luke <james92856@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
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 15:56:56 -0700	[thread overview]
Message-ID: <CAFOX7Shg1jVRZXxipdpG7QtXebY2P2sf5YRrRX0kY2TpkxDWhA@mail.gmail.com> (raw)
In-Reply-To: <83r1gpqgz5.fsf@gnu.org>

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	other threads:[~2021-06-26 22:56 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
2021-06-26 22:56   ` James Luke [this message]
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=CAFOX7Shg1jVRZXxipdpG7QtXebY2P2sf5YRrRX0kY2TpkxDWhA@mail.gmail.com \
    --to=james92856@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).