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: Sun, 27 Jun 2021 09:08:42 +0300

> From: James Luke <james92856@gmail.com>
> Date: Sat, 26 Jun 2021 15:56:56 -0700
> Cc: emacs-devel@gnu.org
> 
> >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.

AFAIK, it doesn't require gcc the driver, but it does use cc1, the
assembler, and the linker.

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

You could do that, but such builds will not support native
compilation.

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

Not sure how you looked.  I added the "-t -t" switches to the link
command line in lib-src, and saw that an MS-Windows build of those
programs uses getopt.c, memmem.c, and sha256.c modules for
make-fingerprint; and binary-io.c and c-type.c modules for
make-docfile.  How would you avoid using those?

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

The MSYS installation on my MS-Windows box has neither the base32 nor
the base256 commands, FWIW.



reply via email to

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