From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel 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 Message-ID: <83wnqfq1p1.fsf@gnu.org> References: <83r1gpqgz5.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18016"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: James Luke Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 27 08:09:57 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxNzR-0004VP-4w for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Jun 2021 08:09:57 +0200 Original-Received: from localhost ([::1]:39498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxNzQ-0002p9-6q for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Jun 2021 02:09:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxNyK-00029f-AZ for emacs-devel@gnu.org; Sun, 27 Jun 2021 02:08:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56758) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxNyK-0008BQ-2w; Sun, 27 Jun 2021 02:08:48 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3997 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxNyJ-00011T-Lj; Sun, 27 Jun 2021 02:08:48 -0400 In-Reply-To: (message from James Luke on Sat, 26 Jun 2021 15:56:56 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271039 Archived-At: > From: James Luke > 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///' | 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.