From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: On elisp running native Date: Sat, 28 Dec 2019 12:06:05 +0200 Message-ID: <83sgl4ojci.fsf@gnu.org> References: <838smzq9iz.fsf@gnu.org> <8336d6rfgy.fsf@gnu.org> <83woagonl9.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="75174"; mail-complaints-to="usenet@blaine.gmane.org" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 28 11:06:15 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1il8z7-000JOk-Se for ged-emacs-devel@m.gmane.org; Sat, 28 Dec 2019 11:06:14 +0100 Original-Received: from localhost ([::1]:42268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1il8z6-0004oi-Bf for ged-emacs-devel@m.gmane.org; Sat, 28 Dec 2019 05:06:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42219) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1il8z0-0004oc-TA for emacs-devel@gnu.org; Sat, 28 Dec 2019 05:06:08 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1il8z0-0003Dk-ED; Sat, 28 Dec 2019 05:06:06 -0500 Original-Received: from [176.228.60.248] (port=4135 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1il8yz-0008AY-Nw; Sat, 28 Dec 2019 05:06:06 -0500 In-reply-to: (message from Andrea Corallo on Sat, 28 Dec 2019 08:56:17 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243725 Archived-At: > From: Andrea Corallo > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > Date: Sat, 28 Dec 2019 08:56:17 +0000 > > Eli Zaretskii writes: > > > I'm not sure I understood you, but dlopen, dlsym etc. (or their moral > > equivalents) are readily available on Windows; see src/dynlib.c. So > > that cannot be the reason why libgccjit is not available on Windows. > > Sure, but libgccjit AFAIU just calls directly dlopen > (gcc/gcc/jit/jit-playback.c:2650). That's OK. One of the MinGW flavors actually provides these functions directly; for the other it should be easy to write them so that libgccjit can call them. > I've just found this interesting old thread: > > https://gcc.gnu.org/ml/jit/2015-q3/msg00124.html Thanks. Not sure what to make from that, especially since AFAIK the Windows code is PIC by default. The problems they are talking about are very easy to solve, but somehow no one has yet solved them. Which might mean there's more to it than meets the eye. (However, I'm talking out of sheer ignorance, so perhaps you should ask on the GCC list whether there are any fundamental problems with providing libgccjit on Windows.) Maybe you should explain in more detail how will the compiled code be loaded into Emacs. Is each .el file compiled into a separate shared library? If so, when the shared library is loaded, what entry point is called, and how does Emacs know which entry point to call when? Also, compiling needs gas and ld, right? IOW, people who'd like to use this feature for Lisp that is not part of Emacs will have to have GCC and GNU Binutils installed, something that AFAIU is not guaranteed even on GNU/Linux these days.