From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] [WIP] Port feature/native-comp to Windows. Date: Sun, 10 May 2020 22:16:24 +0300 Message-ID: <83blmvd2if.fsf@gnu.org> References: <5eb5b953.1c69fb81.a67ce.a764@mx.google.com> <83lfm1hc91.fsf@gnu.org> <83wo5lds87.fsf@gnu.org> <83lflzd8es.fsf@gnu.org> <83ftc7d4zu.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="ciao.gmane.io:159.69.161.202"; logging-data="34516"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, akrl@sdf.org To: Nicolas =?utf-8?Q?B=C3=A9rtolo?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 10 21:17:10 2020 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 1jXrRl-0008sg-7J for ged-emacs-devel@m.gmane-mx.org; Sun, 10 May 2020 21:17:09 +0200 Original-Received: from localhost ([::1]:53028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXrRk-0002GP-88 for ged-emacs-devel@m.gmane-mx.org; Sun, 10 May 2020 15:17:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXrRA-0001RL-Bc for emacs-devel@gnu.org; Sun, 10 May 2020 15:16:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48147) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXrRA-0004rx-1e; Sun, 10 May 2020 15:16:32 -0400 Original-Received: from [176.228.60.248] (port=4113 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jXrR9-0002jy-DL; Sun, 10 May 2020 15:16:31 -0400 In-Reply-To: (message from Nicolas =?utf-8?Q?B=C3=A9rtolo?= on Sun, 10 May 2020 16:02:11 -0300) 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:249702 Archived-At: > From: Nicolas BĂ©rtolo > Date: Sun, 10 May 2020 16:02:11 -0300 > Cc: Andrea Corallo , emacs-devel@gnu.org > > > This is known in advance. We already have that knowledge in Emacs, > > see HAVE__SETJMP and HAVE_SIGSETJMP used in lisp.h. > > > I don't yet understand why we need the _name_ of the setjmp function. > > How will this name be used? > > I think it is a good idea to show how the information is used: > This is the function that generates a function call to `setjmp`. Thanks, I will think about this. But up front, we can simply use the apriori knowledge about the way the setjmp macro is expanded in the version used for building Emacs. We could build in some defenses against changes in that expansion, if that is a real danger, but that's not urgent. > > The gcc executable is always on PATH, only the auxiliary programs > > (cc1.exe etc.) aren't. Otherwise you couldn't compile programs in > > arbitrary directories. > > What about users that don't have `gcc` in PATH? That'd mean the user's GCC installation is not workable. I don't think we need to consider this case, at least not seriously and not as our first goal. > > What is the definition of "the appropriate GCC version" in this > > context? E.g., does it have to be exactly the same version as the one > > used to build Emacs itself? Or does it mean something else? > > The GCC that comes from the source tree that libgccjit was built from. > > Lets say Emacs was built with libgccjit 9.2 and the user has GCC 10.0.0 > installed: it would be a very bad idea to use the local installation, AFAIU. > In fact, libgccjit will not even try and it'll fail. But that's a problem on any platform, not just on Windows, isn't it? It would mean that when you upgrade GCC, you need to rebuild Emacs in order to be able to continue natively-compiling Lisp files, even if your Emacs version stays the same. Is this reasonable? What will GNU/Linux users do that install binary distributions of Emacs -- will they have to install a very particular version of GCC to be able to compile to native code, and never upgrade it, except together with upgrading Emacs? Sounds very inconvenient to me. I thought that we expect to use libgccjit that's part of the GCC installation on the system where Emacs is used, i.e. that libgccjit would be a shared library into which Emacs will call. You seem to be saying that libgccjit will come with Emacs (or be statically linked into Emacs), and the end-user will have to have a GCC installation of the same version from which libgccjit came on the system where Emacs was built.