From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Luke Newsgroups: gmane.emacs.devel 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 Message-ID: References: <83r1gpqgz5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37474"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 27 02:51:01 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 1lxJ0n-0009a8-AY for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Jun 2021 02:51:01 +0200 Original-Received: from localhost ([::1]:41158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxJ0l-0000lO-PG for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Jun 2021 20:50:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxHEc-0005Hd-Ng for emacs-devel@gnu.org; Sat, 26 Jun 2021 18:57:10 -0400 Original-Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:40543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lxHEb-0002UY-2A; Sat, 26 Jun 2021 18:57:10 -0400 Original-Received: by mail-qk1-x731.google.com with SMTP id x1so19418998qkp.7; Sat, 26 Jun 2021 15:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sG5LByKFneJsMOuFY045YtVIFu9XJqZ9pklxoS8+kBU=; b=mRyv8ubgqNDUXWre8eYJM+kZ7hVQ1OQrUEKtlJIgcarSuxbORz6tHEpGBMtnMIh+Z4 Ko4Y87IaKOeLlWNvJtba2RovQchMtKEdVs8kGegybZLZZoHJRncP2GVDK+6eZAqsBPd8 UUkhiZswyj/EieMCNlQWUn7GOpLwNkpDwv/Qvh8mlQsDNsgLxGZklglWQlgjX6XdxD0a Gbn6bvR/EGhUXDPvzha+jyrfKe6QrYQCQxQPJUVL+w81fcLKawmAPobC2arOMMY2eTKm kfSS/E9u+quCZgMtsMRfmWu2DmYzT0MDru2QQp9aH3IMfYW55Nht7Ya5SHebCtbr30z6 1vFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sG5LByKFneJsMOuFY045YtVIFu9XJqZ9pklxoS8+kBU=; b=bgMpyVhe2GzaGGbmwZYDPUs6XYjfkNk+7OB0oTUKMBSAC7/U7tY3rDo9RGThUDZic3 BsOvVvFCgh+qYJnIqxjO3EfxnPorH5skm/D65P0yuKNl1IPvjAtrb3g47CpVu6IBElIs ADEVc3y5D0P6abNzKWVlngldITTluROaQWV/42ylIY9oufISbNtoI/j6k52XC/D7oLW5 MTwALPjUsYFCc8+ZZU58o8dAx0yvasWnk9BIlrvcJCzMOf5dL1rv9EW8b1wxRjB+szmU TqqciormFLK/TXwlzduKWPDPzjwbpr/kEsfwfeocQQvAqC6pfTHR5MmBebjXk2l/9SZ5 CYkQ== X-Gm-Message-State: AOAM532MeGix0TSB8Pb9F35adWbL31zdHQDU8+mAn4LXiztZoiHXc5lO F/WK+LYyqBIPg3evJk0YOH5k3KgZXtb1csYnkwuMCc9SBQrmv/6luQ8= X-Google-Smtp-Source: ABdhPJzIbdtQWrE/tC66pZl5kpExpMVvmwLYPGMUE/I2zMMuCc6xZp5N8fpFW2IUAVf4EDeBSKzV7wvTaShVNE/gjhg= X-Received: by 2002:a05:620a:a12:: with SMTP id i18mr3181017qka.87.1624748227818; Sat, 26 Jun 2021 15:57:07 -0700 (PDT) In-Reply-To: <83r1gpqgz5.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::731; envelope-from=james92856@gmail.com; helo=mail-qk1-x731.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 26 Jun 2021 20:50:21 -0400 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:271038 Archived-At: On Fri, 25 Jun 2021 at 23:26, Eli Zaretskii 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///' | 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. :-)