From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: On elisp running native Date: Mon, 24 Feb 2020 23:21:02 +0000 Message-ID: References: <838smzq9iz.fsf@gnu.org> <8336d6rfgy.fsf@gnu.org> <83woagonl9.fsf@gnu.org> <83sgl4ojci.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="40785"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 25 00:22:00 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 1j6N2u-000AE3-3N for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Feb 2020 00:21:52 +0100 Original-Received: from localhost ([::1]:45948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6N2s-0000pe-NT for ged-emacs-devel@m.gmane-mx.org; Mon, 24 Feb 2020 18:21:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44733) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6N2H-0000MS-8v for emacs-devel@gnu.org; Mon, 24 Feb 2020 18:21:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6N2G-0005Ka-4E for emacs-devel@gnu.org; Mon, 24 Feb 2020 18:21:13 -0500 Original-Received: from mx.sdf.org ([205.166.94.20]:57889) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6N2B-0005GD-VY; Mon, 24 Feb 2020 18:21:08 -0500 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 01ONL2q1001629 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 24 Feb 2020 23:21:02 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 01ONL2Gq032489; Mon, 24 Feb 2020 23:21:02 GMT In-Reply-To: <83sgl4ojci.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 28 Dec 2019 12:06:05 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 205.166.94.20 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:245056 Archived-At: Eli Zaretskii writes: >> 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.) I just bumped in this Chinese blog where the guy apparently is running the native-comp branch on Windows 10 using mingw64: http://www.albertzhou.net/blog/2020/01/emacs-native-comp.html To a quick look in libgccjit he had to modify the dlopen&friends part and added some handling for temporary files. In Emacs comp.c code he touched some setjmp code. I know zero about Windows but this should help answering the question if this port is possible and what's roughly the effort. Andrea -- akrl@sdf.org