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: Mon, 11 May 2020 17:17:40 +0300 Message-ID: <833686d08r.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> <83blmvd2if.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="3505"; 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 Mon May 11 16:23:11 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 1jY9Ko-0000mb-Tl for ged-emacs-devel@m.gmane-mx.org; Mon, 11 May 2020 16:23:10 +0200 Original-Received: from localhost ([::1]:57794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY9Kn-0008E1-W1 for ged-emacs-devel@m.gmane-mx.org; Mon, 11 May 2020 10:23:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY9Fi-0001Gv-0A for emacs-devel@gnu.org; Mon, 11 May 2020 10:17:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36398) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY9Fg-0006Fk-MZ; Mon, 11 May 2020 10:17:53 -0400 Original-Received: from [176.228.60.248] (port=1585 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jY9FY-0004Jk-M5; Mon, 11 May 2020 10:17:51 -0400 In-Reply-To: (message from Nicolas =?utf-8?Q?B=C3=A9rtolo?= on Sun, 10 May 2020 16:41:42 -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:249787 Archived-At: > From: Nicolas BĂ©rtolo > Date: Sun, 10 May 2020 16:41:42 -0300 > Cc: Andrea Corallo , emacs-devel@gnu.org > > > 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. > > I thought that libgccjit was going to be shipped with Emacs, and therefore it > made most sense to just add a few support files to the Emacs ZIP file. I don't think it would be wise for us to distribute libgccjit, because then we'd need to distribute the GCC sources, and the user will be unable to reliably use the shipped libgccjit with their local GCC installation (due to possible version mismatch). > Right now libgccjit is a shared library that is linked at build time against > Emacs. That is: Emacs will not even start if it was built with native > compilation and the OS dynamic linker cannot find libgccjit.so. > > If we intend to depend on the system libgccjit then we need to dlopen() > libgccjit. Just like what's done to libpng or libjansson. Right, I think at least on MS-Windows we need to do that. On Posix platforms, Emacs will be able to start if there's no libgccjit (and will crash if it attempts to call any of its functions), so it might be a good idea to use dlopen/dlsym there as well. But on Windows it is IMO critical.