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: Speeding up the bootstrap build - a quick hack. Date: Tue, 18 Jan 2022 18:50:05 +0200 Message-ID: <83czkpugxu.fsf@gnu.org> References: <87pmopp4jy.fsf@gmail.com> <87ee55p1wr.fsf@gmail.com> <875yqhp0w1.fsf@gmail.com> <871r15oz58.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32000"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 18 17:54:34 2022 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 1n9rkf-00085d-NV for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Jan 2022 17:54:33 +0100 Original-Received: from localhost ([::1]:60040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9rke-0001av-EK for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Jan 2022 11:54:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9rh3-0004It-Eo for emacs-devel@gnu.org; Tue, 18 Jan 2022 11:50:49 -0500 Original-Received: from [2001:470:142:3::e] (port=40634 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9rgw-0008Nh-2N; Tue, 18 Jan 2022 11:50:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=g1KmheNZ/bxrs6d7/03LzTSazpz2WXlS9QBt8WOTvbQ=; b=orETDM7uTfgUVjkkDuol jRAWRW0zF/wq46YiF5udAZpzQl0ymk9uOLwqFTdMyUbOp7Nl19aMxUTUkVOgKwNMbxTeqSDirMSD8 qxk+hB/WRxp4X1oAmRXfvhsrF9s67W7qJLRqAZD6wfnQm04zhXtBXkRfZHV0mn15Ud7A1nWdK2ZfB HUBVKqgfsydSkNJF42ctZ78sc4udZipfRAmaeA2ivTIN1wUt4iJu4lgTIfG8stdizt4iEE7fsPQSB sQSXGBvGcCfSl82FrMDd2L0VbrA8FQi2WNG6To10V4dVhqf3XK9L5NcTqbPNZCaWK80wEpuYLqXF0 0l+YDt9r1BYm+g==; Original-Received: from [87.69.77.57] (port=1838 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 1n9rgR-0001Su-Uu; Tue, 18 Jan 2022 11:50:17 -0500 In-Reply-To: <871r15oz58.fsf@gmail.com> (message from Robert Pluim on Tue, 18 Jan 2022 16:13:23 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:284939 Archived-At: > From: Robert Pluim > Date: Tue, 18 Jan 2022 16:13:23 +0100 > Cc: Alan Mackenzie , emacs-devel@gnu.org > > >>>>> On Tue, 18 Jan 2022 15:35:42 +0100, Robert Pluim said: > Stefan> In an ideal world the second rule would not have `bytecomp.elc` as its > Stefan> target but would have something like `bytecomp.eln` instead, but we have > Stefan> not yet been able to teach Make how to compute the name of the generated > Stefan> `.eln` file (it's not just `bytecomp.eln` but includes some hash of the > Stefan> Emacs binary). > > Robert> Thereʼs no other file or directory name that contains that hash? Could > Robert> we do a dummy compile of an empty .el using the native compiler and > Robert> derive the hash from that? (and then compile the native compiler with > Robert> the byte compiler). > > Answering my own question: > > src/emacs -batch --eval '(message "%s" (comp-el-to-eln-filename \ > "./lisp/emacs-lisp/bytecomp.el" (car (last \ > native-comp-eln-load-path))))' 2>&1 > > seems to give the right answer. Yes, and that needs the working Emacs binary, so it doesn't come for free. On top of that, some of the COMPILE_FIRST targets end up in that directory, others it its preloaded/ subdirectory: something else that only Emacs knows about.