From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#58318: 28.2; Emacs installed from package won't work with MinGW Date: Fri, 07 Oct 2022 12:35:52 +0000 Message-ID: References: <835ygxsdyu.fsf@gnu.org> <87zge9w049.fsf@gnus.org> <83k05dovwq.fsf@gnu.org> <87a667x3l4.fsf@gnus.org> <83edvjondh.fsf@gnu.org> <87sfjzvnyu.fsf@gnus.org> <837d1bomsv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13415"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , corwin@bru.st, 58318@debbugs.gnu.org, bartosz.bubak@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 07 16:33:20 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ogoPg-0003LU-Jf for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 16:33:20 +0200 Original-Received: from localhost ([::1]:33220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogoPf-0003Pr-8m for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 10:33:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogmaA-0003xN-BU for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 08:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35642) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogmaA-0003qU-2i for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 08:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogma9-0004tX-UT for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 08:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Oct 2022 12:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58318 X-GNU-PR-Package: emacs Original-Received: via spool by 58318-submit@debbugs.gnu.org id=B58318.166514615918806 (code B ref 58318); Fri, 07 Oct 2022 12:36:01 +0000 Original-Received: (at 58318) by debbugs.gnu.org; 7 Oct 2022 12:35:59 +0000 Original-Received: from localhost ([127.0.0.1]:34720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogma6-0004tF-Sh for submit@debbugs.gnu.org; Fri, 07 Oct 2022 08:35:59 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:55742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogma4-0004t5-MT for 58318@debbugs.gnu.org; Fri, 07 Oct 2022 08:35:58 -0400 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 297CZqef003689 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Fri, 7 Oct 2022 12:35:53 GMT In-Reply-To: <837d1bomsv.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 07 Oct 2022 15:12:00 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:244791 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Lars Ingebrigtsen >> Cc: Andrea Corallo , corwin@bru.st, bartosz.bubak@gmail.com, >> 58318@debbugs.gnu.org >> Date: Fri, 07 Oct 2022 14:04:57 +0200 >> >> Eli Zaretskii writes: >> >> > Maybe there's a misunderstanding of what you meant by "if a compiler >> > isn't present". By "the compiler" do you mean libgccjit, or is it GCC >> > and Binutils (or maybe all 3 together)? IOW, are you talking about >> > the ability to load existing *.eln files, or are you talking about the >> > ability to both load existing *.eln files and produce new ones? >> >> I'm talking about trampolines, nothing else. > > Trampoline generation requires all the 3 components to be present, > AFAIK. Andrea, am I right? AFAIU only libgccjit and Binutils are necessary, but libgccjit *is* GCC (in the sense another frontend fo the GNU Compiler Collection). I *think* gcc the binary (read the C frontend) should not be required. But I don't know how distros package libgccjit and gcc, there might be some dendency I'm not aware of. >> > The startup code currently detects that libgccjit is unavailable or >> > cannot be loaded, and if so, disables all the aspects of >> > native-compilation: both JIT compilation of *.el and production of the >> > trampolines. I'm not aware that when we disable those two, we get >> > Emacs that is not "fully functional". >> >> If native compilation is disabled in a native-compiled Emacs, then >> >> (fset 'yes-or-no-p 'y-or-n-p) >> >> doesn't work (for calls to `yes-or-no-p' in native-compiled code). >> That's what I meant by "not fully functional". > > If it indeed doesn't work (and I wasn't aware it didn't work), we > should try fixing it, if that is feasible. Yes because `yes-or-no-p' is a primitive, so with no trampolines its redefinition is not functional. A quick ad-hoc fix for `yes-or-no-p' is attached. It does not have a perf impact as `yes-or-no-p' will have to wait for the user input anyway, if okay I can push it. Oherwise another strategy would be to disable direct calls from lisp native code into primitives on Windows, this indeed has a performance impact. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Add-yes-or-no-p-to-native-comp-never-optimize-functi.patch >From a6d736d532e20b6763a7ff1995f952fc293886dd Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Fri, 7 Oct 2022 12:28:51 +0000 Subject: [PATCH] * Add `yes-or-no-p' to `native-comp-never-optimize-functions'. * lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions): Add `yes-or-no-p'. --- lisp/emacs-lisp/comp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 5ee10fcbca2..2812e53bcc2 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -104,7 +104,7 @@ native-comp-never-optimize-functions '(;; The following two are mandatory for Emacs to be working ;; correctly (see comment in `advice--add-function'). DO NOT ;; REMOVE. - macroexpand rename-buffer) + macroexpand rename-buffer yes-or-no-p) "Primitive functions to exclude from trampoline optimization." :type '(repeat symbol) :version "28.1") -- 2.35.1.577.g74cc1aa55f --=-=-=--