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.bugs Subject: bug#58318: 28.2; Emacs installed from package won't work with MinGW Date: Fri, 07 Oct 2022 16:48:16 +0300 Message-ID: <83tu4fn3rz.fsf@gnu.org> 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> <83wn9bn69q.fsf@gnu.org> 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="30560"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, corwin@bru.st, 58318@debbugs.gnu.org, bartosz.bubak@gmail.com To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 07 16:59:50 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 1ogopJ-0007oS-Nb for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 16:59:49 +0200 Original-Received: from localhost ([::1]:56586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogopI-000647-Nj for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 10:59:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ognip-0003Q0-HP for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 09:49:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ognio-0007Pk-BX for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 09:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ognio-0002k0-5O for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 09:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Oct 2022 13:49:02 +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.166515051110493 (code B ref 58318); Fri, 07 Oct 2022 13:49:02 +0000 Original-Received: (at 58318) by debbugs.gnu.org; 7 Oct 2022 13:48:31 +0000 Original-Received: from localhost ([127.0.0.1]:34869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogniI-0002jA-W3 for submit@debbugs.gnu.org; Fri, 07 Oct 2022 09:48:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogniG-0002ix-HM for 58318@debbugs.gnu.org; Fri, 07 Oct 2022 09:48:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogniB-0007LG-66; Fri, 07 Oct 2022 09:48:23 -0400 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=UoUSN+HPHBIokPp10mDa1u98YyuAdAqWl84iObQh6Dc=; b=T1q1c05+n3QaoYlKTCl/ i/G6jeQyg5dCp8cKMR1HIWFd+4iM231abImjZJOe34R0Ql0lx+vtYj5IvKZsmjwddG7Z/KXBzJy24 grCQXCWfe2UHc1JeQjiSz4BPE7rPgYtps+ubPBKOIScKGYivElgS3H+7QzJYoIo1tQUWStUNbU74l LO/N7QYzbP5oBxUWSgZQSz5mkLTJgPcJwcJA5l84RTA3uUs5zOZXG8OqQlsBGv+jDaPxJhSFTaPN9 2zttpvdyFZnNQs0Jelldoqnm7CxgPmiBEzF2YO52vMJ0tJwIxao1u1s33UOrZUVe+VjfRIQEnG5TN FiTKwEkh06kqgg==; Original-Received: from [87.69.77.57] (port=2202 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 1ogni5-0000dV-FI; Fri, 07 Oct 2022 09:48:22 -0400 In-Reply-To: (message from Andrea Corallo on Fri, 07 Oct 2022 13:04:55 +0000) 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:244812 Archived-At: > From: Andrea Corallo > Cc: larsi@gnus.org, corwin@bru.st, bartosz.bubak@gmail.com, > 58318@debbugs.gnu.org > Date: Fri, 07 Oct 2022 13:04:55 +0000 > > > How is this relevant only to Windows? > > Windows is the only system where a native compiled Emacs can start even > if libgccjit is not present. On GNU/Linux we get and error at load time > from the dynamic linker in case. As a consequence on GNU/Linux Emacs is > always capable of producing trampolines when needed. It could be that libgccjit is loaded but is incompatible or something. So I'd prefer a general solution. > > And what do you mean by "disable direct calls from Lisp native code > > into primitives"? I don't think I understand what this would do in > > practice. > > Native compiled elisp calls directly into primitive functions not to go > through funcall. For this reason when a primitive is redefined we need > to produce a trampoline in order to forward these calls to the funcall > machinery. If we disable all of this optimization the issue disappears > but indeed that's not good from a performance point of view. How much will performance suffer if we use funcall? > Indeed the other option is to precompile all trampoline AOT when we know > libgccjit is available. It is actually very simple with something like: > > (mapatoms (λ (f) > (when (subr-primitive-p (symbol-function f)) > (or (comp-trampoline-search f) > (comp-trampoline-compile f))))) > > It was not consired worth as trampoline production is very quick, but > might be worth at least for Windows platforms for the discussed reason. If calling through funcall is too expensive, I think pre-compiling all the trampolines would indeed be the best solution, thanks.