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: Make cross-compiling temacs easier: drop gnulib for build intermediates, or use recursive autoconf? Date: Fri, 25 Jun 2021 19:22:10 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000018368005c5a1ed2f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27648"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 26 07:52:51 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 1lx1FK-00070s-L2 for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Jun 2021 07:52:50 +0200 Original-Received: from localhost ([::1]:58366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lx1FJ-00006m-KA for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Jun 2021 01:52:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwxxk-0001co-7x for emacs-devel@gnu.org; Fri, 25 Jun 2021 22:22:28 -0400 Original-Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]:39429) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwxxf-0004QG-GG for emacs-devel@gnu.org; Fri, 25 Jun 2021 22:22:28 -0400 Original-Received: by mail-io1-xd33.google.com with SMTP id y76so4154475iof.6 for ; Fri, 25 Jun 2021 19:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=OM8Vj4FZlfZyoQoc6Q/1YTq9DRQAaHGsWJs4XNoQ6sg=; b=QcfC4MGlDac4HirAy/sja4RpdEO85x/edZvTRSUkB88sOWBORcqoRudMrlpvCOFkXY YinFDdzmWh3HZX4f6UYwZojhlZQcc9e1xcQyIcmxWSluIWakA01e6aL5yVuEU7IiP5mn XDzad55N0t58dNBizR1MTo0bkqXq66v6kFKZAa7O+qH6XsmKZ9bX/B5sUgTA8NV3/Jka 1M33VyzU4P22DNg9YgOTaaxB6DH1ChazJVh2/TiaG7hbVjvQFzqoi6A5W/V6TLU7RWp7 k69gGnczR8jsV9Mn0/SQmoXE4BynBYP+T0LiTJ7yf8ZwxkuPf7s58QthNWugzepijEbC hbAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=OM8Vj4FZlfZyoQoc6Q/1YTq9DRQAaHGsWJs4XNoQ6sg=; b=XGgNqIGeNqIsCqpb1t71zPvr/DYeiAAKv+8y81xj1BlaqNB2s/5bLv1QP8QU2Ckw7I PNhGdx6m+7w02dP/3g388SudAQpdYfnX8qqxOiNOCspPiaHEjh8qkopvn9PO8T2tzXYu b3xcLrlXuKyVBD0UAgKunXlL0dN3yYvqA35oxnqRPWyoTfpWj7SE/0bnZPf3sSmmrIfE ONeMAkglmJeslRnHGkImyK6grXpGg97SzX/hFzaP7CYvVKrcj31JZSYuXbauTiJF5Nkj 3ApG5f3RnkKeBdmbXdVpSNe5cJA1z081QNiQyQEWdSUEu/v2MC6dXI3J41z4tR6Mpb/1 R7jw== X-Gm-Message-State: AOAM532DyrALdZ9qQX/3H0jWlQ81puScUTZbec1drvPh6vQElVTPzIuT y2/KY7wbH4T/WcdCDiqF3G52GJDpftNWyyI+T5/K7NXgk2W0u04q X-Google-Smtp-Source: ABdhPJxMYNvx1W20h49q0ZTecCI1BE7EWYosVE2LZpaNBdppvYvTLws7k4f6+BsqT+x9mvf4Kev/69xsqLZGfmo67zY= X-Received: by 2002:a5d:9acd:: with SMTP id x13mr11017764ion.134.1624674141745; Fri, 25 Jun 2021 19:22:21 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::d33; envelope-from=james92856@gmail.com; helo=mail-io1-xd33.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, HTML_MESSAGE=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 01:52:03 -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:271017 Archived-At: --00000000000018368005c5a1ed2f Content-Type: text/plain; charset="UTF-8" I'm interested in making cross-compilation of emacs easier. Or rather, making cross-compilation of temacs easier, such that one can run temacs on the host machine to finish the build. This would make it easier to create reproducible builds (particularly with Guix/NixOS as the build machine), and means one doesn't need a C compiler on the host. Right now the problem I'm running into is caused by build intermediates that must be built then run on the builder: the programs "lib-src/make-docfile.c" and "lib-src/make-fingerprint.c". These intermediates both use gnulib (with #include etc), but configure.ac only configures gnulib for the host machine. So the headers, #defines, and library are all wrong for the build machine and compilation fails. To fix this, I'd like to rewrite make-fingerprint.c and make-docfile.c to avoid non-portable constructs and thus the dependency on gnulib, but I don't know if this is considered acceptable for a GNU project. The alternative is a larger overhaul of the build system, with a nested configure script (to run configure for the builder when doing a cross build), another makefile, and another gnulib tree (for the modules needed only for the intermediates). I suspect the latter would be more fragile and produce a much larger maintenance burden than the former. Would there be any objections to the simple rewrite? --00000000000018368005c5a1ed2f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm interested in making cross-compilation of ema= cs easier. Or rather, making cross-compilation of temacs easier, such that = one can run temacs on the host machine to finish the build. This would make= it easier to create reproducible builds (particularly with Guix/NixOS as t= he build machine), and means one doesn't need a C compiler on the host.= Right now the problem I'm running into is caused by build intermediate= s that must be built then run on the builder: the programs "lib-src/ma= ke-docfile.c" and "lib-src/make-fingerprint.c".
These intermediates both use gnulib (with #include <config.h> e= tc), but configure.ac only configures g= nulib for the host machine. So the headers, #defines, and library are all w= rong for the build machine and compilation fails. To fix this, I'd like= to rewrite make-fingerprint.c and make-docfile.c to avoid non-portable con= structs and thus the dependency on gnulib, but I don't know if this is = considered acceptable for a GNU project. The alternative is a larger overha= ul of the build system, with a nested configure script (to run configure fo= r the builder when doing a cross build), another makefile, and another gnul= ib tree (for the modules needed only for the intermediates). I suspect the = latter would be more fragile and produce a much larger maintenance burden t= han the former.

Would there be any objections to t= he simple rewrite?
--00000000000018368005c5a1ed2f--